src/Quiz.java
/**
     * Update that is called each frame
     */
Update that is called each frame
Update that is called each frame
public void update(){
        int mx = MouseInput.getX(game);
        int my = MouseInput.getY(game);
        if(mx >= 45 && mx <= 375 && my >= 360 && my <= 448){
            h1 = true;
        }else if(mx >= 431 && mx <= 756 && my >= 362 && my <= 448){
            h2 = true;
        }else if(mx >= 45 && mx <= 375 && my >= 479 && my <= 566){
            h3 = true;
        }else if(mx >= 431 && mx <= 756 && my >= 479 && my <= 566){
            h4 = true;
        }else{
            h1 = false;
            h2 = false;
            h3 = false;
            h4 = false;
        }
        if(userChoice != -1){
            if(userChoice == aC) correct = true;
            else incorrect = true;
        }
    }
public void update ( ) { int mx = MouseInput . getX ( game ) ; int my = MouseInput . getY ( game ) ; if ( mx >= 45 && mx <= 375 && my >= 360 && my <= 448 ) { h1 = true ; } else if ( mx >= 431 && mx <= 756 && my >= 362 && my <= 448 ) { h2 = true ; } else if ( mx >= 45 && mx <= 375 && my >= 479 && my <= 566 ) { h3 = true ; } else if ( mx >= 431 && mx <= 756 && my >= 479 && my <= 566 ) { h4 = true ; } else { h1 = false ; h2 = false ; h3 = false ; h4 = false ; } if ( userChoice != - 1 ) { if ( userChoice == aC ) correct = true ; else incorrect = true ; } }
Update that is called each frame
Update that is called each frame