demilich1 / metastone

Hearthstone simulator written in Java with full GUI support
GNU General Public License v2.0
132 stars 80 forks source link

White Eyes shuffling breaks with more than 30 cards in the deck #355

Closed doctorpangloss closed 7 years ago

doctorpangloss commented 7 years ago

GameLogic::shuffleToDeck incorrectly doesn't shuffle a card into the deck if player.getDeck().getCount() < MAX_DECK_SIZE. The following issue will occur:

  1. Build a deck with Prince Malchezaar and White Eyes.
  2. Draw White Eyes, Innervate, Innervate, play all three.
  3. Observe The Storm Guardian isn't shuffled into your deck.

This comparison is just incorrect in GameLogic::shuffleToDeck.

doctorpangloss commented 7 years ago

Nevermind, I see that MAX_DECK_SIZE is 60, so this isn't going to happen.