コード例 #1
0
	def test_checkFinish_FirstRowIsAllSecondPlayer_ReturnsSecondPlayerWon(self):
		game = Game()
		game.addSecondPlayerMove("A1")
		game.addSecondPlayerMove("A2")
		game.addSecondPlayerMove("A3")
		result = game.checkFinish()
		self.assertEqual(result, game.SecondPlayerWin, 'The second player should have won')
コード例 #2
0
 def test_checkFinish_FirstRowIsAllSecondPlayer_ReturnsSecondPlayerWon(
         self):
     game = Game()
     game.addSecondPlayerMove("A1")
     game.addSecondPlayerMove("A2")
     game.addSecondPlayerMove("A3")
     result = game.checkFinish()
     self.assertEqual(result, game.SecondPlayerWin,
                      'The second player should have won')
コード例 #3
0
	def test_addSecondPlayerMove_AddLegalMove_MoveHasBeenAddedToBoard(self):
		game = Game()
		game.addSecondPlayerMove("A1")
		self.assertTrue(game.checkSquareIsPlayer(2,"A1"))
コード例 #4
0
 def test_addSecondPlayerMove_AddLegalMove_MoveHasBeenAddedToBoard(self):
     game = Game()
     game.addSecondPlayerMove("A1")
     self.assertTrue(game.checkSquareIsPlayer(2, "A1"))