Add LICENSE and README files to the distributions

Add WASD key usage to game

Signed-off-by: Chris Cromer <chris@cromer.cl>
This commit is contained in:
2019-10-10 16:14:38 -03:00
parent a0c23e8cf3
commit 9f6d6853ad
5 changed files with 66 additions and 1 deletions

View File

@@ -37,7 +37,7 @@ public interface Constantes {
/**
* Whether or not the player should be controlled by AI
*/
boolean PLAYER_AI = true;
boolean PLAYER_AI = false;
/**
* Make logs
*/

View File

@@ -95,15 +95,19 @@ public class Player extends Object implements Constantes {
}
}
switch (keyCode) {
case KeyEvent.VK_W:
case KeyEvent.VK_UP:
moveUp();
break;
case KeyEvent.VK_S:
case KeyEvent.VK_DOWN:
moveDown();
break;
case KeyEvent.VK_A:
case KeyEvent.VK_LEFT:
moveLeft();
break;
case KeyEvent.VK_D:
case KeyEvent.VK_RIGHT:
moveRight();
break;