コード例 #1
0
 def test_rotatesPlayersCorrectly(self):
     game = Game("SomeGameName", self.m)
     game.addPlayer(self.j)
     game.beginGame()
     self.assertRegex(game.currentPlayer.name, self.j.name)
     game.rotateCurrentPlayer()
     self.assertRegex(game.currentPlayer.name, self.m.name)
コード例 #2
0
 def test_rotatesPlayersCorrectly(self):
     game = Game("SomeGameName", self.m)
     game.addPlayer(self.j)
     game.beginGame()
     self.assertRegex(game.currentPlayer.name, self.j.name)
     game.rotateCurrentPlayer()
     self.assertRegex(game.currentPlayer.name, self.m.name)
コード例 #3
0
 def test_returnsRotationOfPlayers(self):
     game = Game("SomeGame", self.m)
     game.addPlayer(self.j)
     game.beginGame()
     self.assertEqual(len(game.currentTurn), 1)
     self.assertRegex(game.currentPlayer.name, self.j.name)
     nextPlayer = game.getNextPlayer()
     self.assertRegex(nextPlayer.name, self.m.name)
     nextPlayer = game.getNextPlayer()
     self.assertRegex(nextPlayer.name, self.j.name)
コード例 #4
0
 def test_returnsRotationOfPlayers(self):
     game = Game("SomeGame", self.m)
     game.addPlayer(self.j)
     game.beginGame()
     self.assertEqual(len(game.currentTurn), 1)
     self.assertRegex(game.currentPlayer.name, self.j.name)
     nextPlayer = game.getNextPlayer()
     self.assertRegex(nextPlayer.name, self.m.name)
     nextPlayer = game.getNextPlayer()
     self.assertRegex(nextPlayer.name, self.j.name)