...
if(model.canMove())
view.isGameLost = true;
...
case KeyEvent.VK_R:
model.randomMove();
break;
...
i was sure about this one, but failed 2nd requirement
Resolved
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
Roman
22 May 2019, 06:38solution
2048 (part 9) Requirement 5
"The keyPressed method must set the isGameLost flag to true if no move is possible."
+2
Павел Артеменко
22 May 2019, 04:21
Try to replace "switch" blocks to "if else" blocks both in keyPressed and randomMove.
Somehow validator frowns on switch blocks.
0
Djole
22 May 2019, 08:31
i simplified if clause (Intellij fooled me there), set it to false per earlier requirement but deleted it later.
0