02 - Moving the Ball/script.js
//changes the x or y position depending on the boolean values

changes the x or y position depending on the boolean values
changes the x or y position depending on the boolean values
function move(){
    if(LEFT){
        x--;
    }
    if(UP){
        y--;
    }
    if(RIGHT){
        x++;
    }
    if(DOWN){
        y++;
    }
}
function move ( ) { if ( LEFT ) { x -- ; } if ( UP ) { y -- ; } if ( RIGHT ) { x ++ ; } if ( DOWN ) { y ++ ; } }
changes the x or y position depending on the boolean values
changes the x or y position depending on the boolean values