def testZones(self): """Test the correctness of entity zones in play.""" self._assertZoneAttr() self.game.run_player_action(pa.TurnEnd(self.game)) self._assertZoneAttr() self.game.run_player_action(pa.Concede(self.game)) self._assertZoneAttr()
def testTurnEnd(self): """Test the turn end player action.""" player_before = self.game.current_player self.game.run_player_action(pa.TurnEnd(self.game)) self.assertNotEqual(player_before, self.game.current_player) self._assertEventType( GSE + [std_e.EndOfTurn, std_e.BeginOfTurn, std_e.DrawCard])
def _turnEnds(self, n): """Run many turn-ends player actions. [NOTE]: The return expected event list is correct only when not taking fatigue damage. """ expected_events = [] for _ in range(n): self.game.run_player_action(pa.TurnEnd(self.game)) expected_events.extend( [std_e.EndOfTurn, std_e.BeginOfTurn, std_e.DrawCard]) return expected_events