Reshuffle the correct deck when out of black cards. This has caused a StackOverflowException.
This commit is contained in:
parent
9c65662997
commit
972229aa17
|
@ -974,7 +974,7 @@ public class Game {
|
|||
try {
|
||||
return blackDeck.getNextCard();
|
||||
} catch (final OutOfCardsException e) {
|
||||
whiteDeck.reshuffle();
|
||||
blackDeck.reshuffle();
|
||||
final HashMap<ReturnableData, Object> data = getEventMap();
|
||||
data.put(LongPollResponse.EVENT, LongPollEvent.GAME_BLACK_RESHUFFLE.toString());
|
||||
broadcastToPlayers(MessageType.GAME_EVENT, data);
|
||||
|
|
Loading…
Reference in New Issue