#NEWLINE# def store( self ) : #NEWLINE# #INDENT# "\n        save the current game session's score and data for further use\n        " #NEWLINE# size = self . board . SIZE #NEWLINE# cells = [ ] #NEWLINE# for i in range ( size ) : #NEWLINE# #INDENT# for j in range ( size ) : #NEWLINE# #INDENT# cells . append ( str ( self . board . getCell ( j , i ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# score_str = ( '%s\n%d' % ( ' ' . join ( cells ) , i . score ) ) #NEWLINE# try : #NEWLINE# #INDENT# with open ( self . store_file , 'w' ) as f : #NEWLINE# #INDENT# f . write ( score_str ) #NEWLINE# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# return True