mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
fixed låste programmeringskort
This commit is contained in:
parent
ee18396d3e
commit
ba83654e04
@ -92,7 +92,13 @@ public class CardChoiceScreen extends InputAdapter implements Screen {
|
||||
@Override
|
||||
public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
|
||||
if (chosenCards.size() == maxCards) {
|
||||
roboRallyWrapper.roboRallyGame.setProgram(getCards());
|
||||
List<ProgrammingCard> oldProgram = roboRallyWrapper.roboRallyGame.getProgram();
|
||||
int lockedCardsInt = 5-maxCards;
|
||||
List<ProgrammingCard> newProgram = getCards();
|
||||
for(int i = 5; i>(5-lockedCardsInt);i--){
|
||||
newProgram.add(oldProgram.get(i));
|
||||
}
|
||||
roboRallyWrapper.roboRallyGame.setProgram(newProgram);
|
||||
roboRallyWrapper.roboRallyGame.setGameState(GameState.CHOOSING_POWER_DOWN);
|
||||
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getPowerDownScreen(roboRallyWrapper));
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user