src/MouseInput.java
/**
     * Override method of the MouseListener class
     * @param e MouseEvent
     */
Override method of the MouseListener class
@param e MouseEvent
Override method of the MouseListener class @param e MouseEvent
public void mousePressed(MouseEvent e){
        int mx = e.getX();
        int my = e.getY();
        if(Game.gameState.equals("menu")){
            if(mx > 430 && mx <605 && my > 375 && my < 420){
                Game.gameState = "level select";
                game.fade();
            }else if(mx >= 440 && mx <= 627 && my >= 430 && my <= 467){
                handler.setLevel(4);
                Game.gameState = "game";
                game.fade();
            }else if(mx >= 440 && mx <= 505 && my >= 482 && my <= 517){
                System.exit(1);
            }else if(mx >= 670 && mx <= 775 && my >= 500 && my <= 583){
                Game.gameState = "highscores";
                game.fade();
            }
        }else if(Game.gameState.equals("level select")){
            if(mx > 50 && mx < 505 && my > 182 && my < 234){
                handler.setLevel(1);
                Game.gameState = "game";
                game.fade();
            }else if(mx > 50 && mx < 335 && my > 269 && my < 332){
                handler.setLevel(2);
                Game.gameState = "game";
                game.fade();
            }else if(mx > 50 && mx < 356 && my > 358 && my < 416){
                handler.setLevel(3);
                Game.gameState = "game";
                game.fade();
            }else if(mx > 600 && mx < 760 && my > 530 && my < 560){
                Game.gameState = "menu";
                game.fade();
            }
            Game.score = 60000;
        }else if(Game.gameState.equals("highscores")){
            if(mx >= 140 && mx <= 350 && my >= 555 && my <= 580){
              Game.gameState = "menu";
              game.fade();
            }else if(mx >= 522 && mx <= 595 && my >= 556 && my <= 578){
              Highscore.reset();
              Game.read();
              game.fade();
            }
        }
    }
public void mousePressed ( MouseEvent e ) { int mx = e . getX ( ) ; int my = e . getY ( ) ; if ( Game . gameState . equals ( "menu" ) ) { if ( mx > 430 && mx < 605 && my > 375 && my < 420 ) { Game . gameState = "level select" ; game . fade ( ) ; } else if ( mx >= 440 && mx <= 627 && my >= 430 && my <= 467 ) { handler . setLevel ( 4 ) ; Game . gameState = "game" ; game . fade ( ) ; } else if ( mx >= 440 && mx <= 505 && my >= 482 && my <= 517 ) { System . exit ( 1 ) ; } else if ( mx >= 670 && mx <= 775 && my >= 500 && my <= 583 ) { Game . gameState = "highscores" ; game . fade ( ) ; } } else if ( Game . gameState . equals ( "level select" ) ) { if ( mx > 50 && mx < 505 && my > 182 && my < 234 ) { handler . setLevel ( 1 ) ; Game . gameState = "game" ; game . fade ( ) ; } else if ( mx > 50 && mx < 335 && my > 269 && my < 332 ) { handler . setLevel ( 2 ) ; Game . gameState = "game" ; game . fade ( ) ; } else if ( mx > 50 && mx < 356 && my > 358 && my < 416 ) { handler . setLevel ( 3 ) ; Game . gameState = "game" ; game . fade ( ) ; } else if ( mx > 600 && mx < 760 && my > 530 && my < 560 ) { Game . gameState = "menu" ; game . fade ( ) ; } Game . score = 60000 ; } else if ( Game . gameState . equals ( "highscores" ) ) { if ( mx >= 140 && mx <= 350 && my >= 555 && my <= 580 ) { Game . gameState = "menu" ; game . fade ( ) ; } else if ( mx >= 522 && mx <= 595 && my >= 556 && my <= 578 ) { Highscore . reset ( ) ; Game . read ( ) ; game . fade ( ) ; } } }
Override method of the MouseListener class
 @param e MouseEvent
Override method of the MouseListener class @param e MouseEvent