Fikser en bug der et tomt program i kortinnsamling skaper problemer

This commit is contained in:
Kristian Knarvik 2020-04-28 13:35:49 +02:00
parent ffceabd50c
commit 85100496bf

View File

@ -329,7 +329,7 @@ public class RoboRallyGame implements DrawableGame, InteractableGame {
}
//The player has no locked cards. All previously locked cards should go into the free deck
if (robotDamage <= 4) {
if (robotDamage <= 4 || playerProgram.size() == 0) {
lockedPlayerDeck.emptyInto(player.getProgrammingCardDeck());
continue;
}