need to fix announcements for suit/values

This commit is contained in:
Jake Pullen
2024-05-12 21:50:02 +01:00
parent 110fb4fc1b
commit d6d758b584
+2 -2
View File
@@ -20,13 +20,13 @@ class player:
def discard(self):
return self.hand.pop()
def command(self, suit, value, card_count):
def command(self, suit, value):
rules = json.load(open('rules.json'))
commands = []
#chance to return the wrong command
if random.random() < error_chance:
commands.append('wrong command')
print(f'generating command for {card_count} cards, {suit} and {value}')
print(f'generating command for {len(self.hand)} cards, {suit} and {value}')
for rule in rules:
if 'suit' in rule and rule['suit'] == suit:
commands.append(rule['command'])