Пример #1
0
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()
Пример #2
0
def restoreGame():
    try:
        game = oxo_data.restoreGame()
        if len(game) == 9:
            return game
        else:
            return newGame()
    except IOError:
        return newGame()
Пример #3
0
def restoreGame():
    try:
        game = oxo_data.restoreGame()
        if len(game) == 9:
            return game
        else:
            return newGame()
    except IOError:
        return newGame()
Пример #4
0
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()
Пример #5
0
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()
Пример #6
0
 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
Пример #7
0
 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
Пример #8
0
 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()
Пример #9
0
def restoreGame():
    game = oxo_data.restoreGame()
    return game
Пример #10
0
def restoreGame():
    game = oxo_data.restoreGame()
    return game