Advertisement
Guest User

Untitled

a guest
Aug 30th, 2015
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. public final static int UP = 0;
  2. public final static int DOWN = 1;
  3. public final static int RIGHT = 2;
  4. public final static int LEFT = 3;
  5.  
  6. public void move(int direction) {
  7. switch (direction) {
  8. case UP:
  9. System.out.println("Move UP");
  10. break;
  11. case DOWN:
  12. System.out.println("Move DOWN");
  13. break;
  14. case RIGHT:
  15. System.out.println("Move RIGHT");
  16. break;
  17. case LEFT:
  18. System.out.println("Move RIGHT");
  19. break;
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement