Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int score;
- public static int playerTime = 300;
- public static int []playerObstacle=new int [10];
- public static void main(String[] args) {
- // System.out.println(createMarioObject());
- // left 8592;
- // 8593 up
- // 8594 right
- // 8595 down
- /*
- * char test = 8592; System.out.println(test);
- */
- PrintMarioBoard printmarioboard = new PrintMarioBoard();
- MarioPlayer mario = new MarioPlayer();
- Scanner input = new Scanner(System.in);
- //printTime();
- printmarioboard.generatePipes();
- while (true) {
- //printScore();
- printmarioboard.generatePipes();
- char keyPressed = input.next().charAt(0);
- printmarioboard.keyPressed(Integer.valueOf(keyPressed));
- printmarioboard.reDrawBoard(mario.x, mario.y);
- for(int check: playerObstacle) {
- //System.out.println("x:"+y+" check:"+check);
- System.out.println(check);
- if(check==mario.y) {
- System.out.println("Game Over");
- System.exit(0);
- printmarioboard.die();
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement