def test_game_init(self): game = TicTacToeGame('pX') self.assertEquals('pX', game.player_X) self.assertEquals(None, game.player_O) self.assertEquals([[' '] * 3] * 3, game.board) game.set_player_O('pO') self.assertEquals('pX', game.player_X) self.assertEquals('pO', game.player_O) self.assertEquals([[' '] * 3] * 3, game.board)
def test_game_init(self): game = TicTacToeGame("pX") self.assertEquals("pX", game.player_X) self.assertEquals(None, game.player_O) self.assertEquals([[" "] * 3] * 3, game.board) game.set_player_O("pO") self.assertEquals("pX", game.player_X) self.assertEquals("pO", game.player_O) self.assertEquals([[" "] * 3] * 3, game.board)
def get_game(self, moves=()): game = TicTacToeGame('pX') game.set_player_O('pO') for sid, x, y in moves: game.move(sid, x, y) return game
def get_game(self, moves=()): game = TicTacToeGame("pX") game.set_player_O("pO") for sid, x, y in moves: game.move(sid, x, y) return game