Je ne comprends pas pourquoi la derniere conditon n'est pas validée . J'ai pourtant mis un if pour faire Game Over si aucun mouvement n'est possible .
I don' t understand why the last condition is not correct . I put an if to make Game Over if any move are available.
derniere condition/ last condition
Under discussion
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
Bullock
10 September 2020, 16:27
public void onKeyPress(Key key)//Deplacement
{
boolean Finish = canUserMove();
if (Finish=false)
{
gameOver();
}
else
{
if(key == Key.LEFT)
{
moveLeft();
drawScene();
}
else
{
if(key == Key.RIGHT)
{
moveRight();
drawScene();
}
else
{
if(key == Key.UP)
{
moveUp();
drawScene();
}
else
{
if(key == Key.DOWN)
{
moveDown();
drawScene();
}
}
}
}
}
}
0
Dave Andrea
10 September 2020, 14:57
Can you share the code? S'il vous plait
0