Advertisement
Guest User

Call Functions

a guest
Jan 23rd, 2019
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1.  
  2. public static int score;
  3. public static int playerTime = 300;
  4. public static int []playerObstacle=new int [10];
  5. public static void main(String[] args) {
  6. // System.out.println(createMarioObject());
  7.  
  8. // left 8592;
  9. // 8593 up
  10. // 8594 right
  11. // 8595 down
  12. /*
  13. * char test = 8592; System.out.println(test);
  14. */
  15. PrintMarioBoard printmarioboard = new PrintMarioBoard();
  16. MarioPlayer mario = new MarioPlayer();
  17. Scanner input = new Scanner(System.in);
  18. //printTime();
  19.  
  20. printmarioboard.generatePipes();
  21.  
  22. while (true) {
  23. //printScore();
  24. printmarioboard.generatePipes();
  25. char keyPressed = input.next().charAt(0);
  26.  
  27. printmarioboard.keyPressed(Integer.valueOf(keyPressed));
  28.  
  29. printmarioboard.reDrawBoard(mario.x, mario.y);
  30. for(int check: playerObstacle) {
  31. //System.out.println("x:"+y+" check:"+check);
  32. System.out.println(check);
  33. if(check==mario.y) {
  34. System.out.println("Game Over");
  35. System.exit(0);
  36. printmarioboard.die();
  37.  
  38. break;
  39. }
  40.  
  41. }
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement