fixed some bugs with locked cards

This commit is contained in:
Tobydrama
2020-04-21 16:44:13 +02:00
parent 05a92ff9a0
commit d36ff8192b
3 changed files with 11 additions and 2 deletions

View File

@@ -95,9 +95,12 @@ public class CardChoiceScreen extends InputAdapter implements Screen {
List<ProgrammingCard> oldProgram = roboRallyWrapper.roboRallyGame.getProgram();
int lockedCardsInt = 5-maxCards;
List<ProgrammingCard> newProgram = getCards();
for(int i = 5; i>(5-lockedCardsInt);i--){
for(int i = 4; i>(4-lockedCardsInt);i--){
newProgram.add(oldProgram.get(i));
}
System.out.println("fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuasdasdasda234234234: "+newProgram.size());
System.out.println(newProgram);
roboRallyWrapper.roboRallyGame.setProgram(newProgram);
roboRallyWrapper.roboRallyGame.setGameState(GameState.CHOOSING_POWER_DOWN);
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getPowerDownScreen(roboRallyWrapper));

View File

@@ -46,6 +46,7 @@ public class LoadingScreen extends AbstractScreen {
if (roboRallyWrapper.roboRallyGame != null) {
GameState gameState = roboRallyWrapper.roboRallyGame.getGameState();
System.out.println(gameState);
if (gameState != GameState.LOADING) {
handleScreenChange(gameState);
}