def test_start_game_action_is_not_legal_for_less_then_three_players(self): for i in range(0, 3): game = Game() for n in range(0, i): game.create_player('Player %d' % n) with self.assertRaises(IllegalActionException): self.action.assert_legal(game)
def test_existing_player_is_enforced(self): game = Game() pa = PlayerAction('red') with self.assertRaises(IllegalActionException): pa.assert_legal(game) game.create_player('redPlayer', 'red') pa.assert_legal(game)
def setUp(self): self.game = Game() self.game.create_player('playerOne', 'red') self.game.create_player('playerTwo') self.game.create_player('playerThree') self.action = StartGameAction('red')
def setUp(self): self.game = Game() self.game.create_player('bluePlayer', 'blue') self.action = PlayerAction('blue')