def restoreGame(): try: game = oxo_data.restoreGame() #if previous game exists, return new game if len(game) == 9: return game else: return newGame() except IOerror: #what is an IO error? return newGame()
def restoreGame(): try: game = oxo_data.restoreGame() if len(game) == 9: return game else: return newGame() except IOError: return newGame()
def restoreGame(): ''' restore previously saved game. If game not restored successfully return new game''' try: game = oxo_data.restoreGame() if len(game) == 9: return game else: return newGame() except IOError: return newGame()
def restore(self): ''' restore previously saved game. If game not restored successfully return new game''' try: self.board = oxo_data.restoreGame() if len(self.board) != 9: self.board = list(" " * 9) return self.board except IOError: self.board = list(" " * 9) return self.board
def restoreGame(self): ''' restore previously saved game. If game not restored successfully return new game''' try: self.gameState = oxo_data.restoreGame() if len(self.gameState) == 9: return self.gameState else: self.newGame() ##return newGame() except IOError: self.newGame() ##return newGame()
def restoreGame(): game = oxo_data.restoreGame() return game