Modified the drawing logic in order that flagged cells cannnot be revealed by the user