Skip to content

Commit

Permalink
fix show all-pokers bug
Browse files Browse the repository at this point in the history
  • Loading branch information
leondelee committed Sep 6, 2018
1 parent 9cf1d56 commit 8257f2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions core/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,16 @@ def handle_shot_poker(self, pokers):
if self.table.last_shot_seat != self.seat and rule.compare_poker(pokers, self.table.last_shot_poker) < 0:
logger.warning('Player[%d] play small than last shot poker', self.uid)
return

self.table.go_next_turn()
if pokers:
self.table.history[self.seat] += pokers
self.table.last_shot_seat = self.seat
self.table.last_shot_poker = pokers
for p in pokers:
self.hand_pokers.remove(p)

if self.hand_pokers:
self.table.go_next_turn()

import debug
if self.uid == debug.over_in_advance:
self.table.on_game_over(self)
Expand Down
2 changes: 1 addition & 1 deletion static/js/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ PG.Game.prototype = {
this.players[loserASeat].reDealPoker();

var loserBSeat = this.uidToSeat(packet[4][0]);
this.players[loserBSeat].replacePoker(packet[4], 2);
this.players[loserBSeat].replacePoker(packet[4], 1);
this.players[loserBSeat].reDealPoker();
// this.players[loserBSeat].removeAllPoker();
// this.players[loserASeat].pokerInHand = [];
Expand Down

0 comments on commit 8257f2b

Please sign in to comment.