def on_check(self, world): if not len(self.cards) == 2: raise kxg.MessageCheck("Player must discard exactly two cards") if not (cards[0] in self.player.hand and cards[1] in self.player.hand): raise kxg.MessageCheck("Card not in player's hand.")
def on_check(self, world): phase = world.phase if not (phase == 'Scoring' or phase == None): raise kxg.MessageCheck("Not in correct phase to start dealing")
def on_check(self, world): if self.player in world.players: raise kxg.MessageCheck("player already exists")
def on_check(self, world): if world.cards: raise kxg.MessageCheck("cards already exists")
def on_check(self, world): if not self.was_sent_by_referee(): raise kxg.MessageCheck("Only the referee can deal cards.")