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)
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)