From 9d2c1d0ce89daa6e767fe3531d90f3b92563802c Mon Sep 17 00:00:00 2001 From: Pesakitan22 Date: Wed, 11 Apr 2018 11:16:26 +0700 Subject: [PATCH] join +1 and wild percentage --- actions.py | 4 ++-- deck.py | 4 ++-- game_manager.py | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/actions.py b/actions.py index d00c583..2d5c374 100644 --- a/actions.py +++ b/actions.py @@ -109,7 +109,7 @@ def do_play_card(bot, player, result_id): .format(name=user.first_name)) if us.stats: - us.games_played += 1 + # us.games_played += 1 if game.players_won is 0: us.first_places += 1 @@ -124,7 +124,7 @@ def do_play_card(bot, player, result_id): us2 = UserSetting.get(id=game.current_player.user.id) if us2 and us2.stats: - us2.games_played += 1 + # us2.games_played += 1 us2.last_places += 1 gm.end_game(chat, user) diff --git a/deck.py b/deck.py index 4f1db83..f0507ea 100644 --- a/deck.py +++ b/deck.py @@ -78,9 +78,9 @@ class Deck(object): self.cards.clear() for color in c.COLORS: for value in c.WILD_VALUES: - for _ in range(4): + for _ in range(2): self.cards.append(Card(color, value)) for special in c.SPECIALS: - for _ in range(6): + for _ in range(8): self.cards.append(Card(None, None, special=special)) self.shuffle() diff --git a/game_manager.py b/game_manager.py index ec49bc4..18a3df8 100644 --- a/game_manager.py +++ b/game_manager.py @@ -62,6 +62,8 @@ class GameManager(object): self.logger.info("Joining game with id " + str(chat.id)) try: + us = UserSetting.get(id=user.id) + us.game_played += 1 game = self.chatid_games[chat.id][-1] except (KeyError, IndexError): raise NoGameInChatError()