#NEWLINE# def onRightClick( self , target ) : #NEWLINE# #INDENT# if ( target . state == 3 ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if self . game . first_click : #NEWLINE# #INDENT# self . game . first_click = False #NEWLINE# self . game . onTimer ( target ) #NEWLINE# #UNINDENT# if ( target . state == 0 ) : #NEWLINE# #INDENT# target . setStyleName ( 'bombflagged' ) #NEWLINE# target . state = 1 #NEWLINE# self . game . flagged_cells . append ( target ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . state == 1 ) : #NEWLINE# #INDENT# target . setStyleName ( 'bombquestion' ) #NEWLINE# target . state = 2 #NEWLINE# self . game . flagged_cells . remove ( target ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( target . state == 2 ) : #NEWLINE# #INDENT# target . setStyleName ( 'blank' ) #NEWLINE# target . state = 0 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# self . game . set_counter ( ) #NEWLINE# self . game . check_win ( )