Beispiel #1
0
 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.")
Beispiel #2
0
 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")
Beispiel #3
0
 def on_check(self, world):
     if self.player in world.players:
         raise kxg.MessageCheck("player already exists")
Beispiel #4
0
 def on_check(self, world):
     if world.cards:
         raise kxg.MessageCheck("cards already exists")
Beispiel #5
0
 def on_check(self, world):
     if not self.was_sent_by_referee():
         raise kxg.MessageCheck("Only the referee can deal cards.")