We want to write a function changeBall that moves a ball to a random location on the screen and changes its color.

var ball;
var radius = 20;
var delay = 50;
function start(){
ball = new circle(radius);
ball.setposition(getwidth()/2, getheight()/2);
ball.setcolor( );
add(ball);
settimer(changeball, delay);
}
function changeball(){
// Move ball to a random location
// Change the ball color
var choice = randomizer.nextint(0, 2);
if(choice == 0){
ball.setcolor( );
} else if (choice == 1){
ball.setcolor( );
} else {
ball.setcolor( );
}
}
Which instructions can we insert at the // Move ball to a random location comment to change the position of the ball to a random location while still keeping the entire ball on the screen?
a. ball.setposition(0, getwidth(), 0, getheight());
b. var x = randomizer.nextint(0, getwidth()); var y = randomizer.nextint(0, getheight()); ball.setposition(x, y);
c. ball.setposition(randomizer.nextposition());
d. var x = randomizer.nextint(ball.getradius(), getwidth() - ball.getradius()); var y = randomizer.nextint(ball.getradius(), getheight() - ball.getradius()); ball.setposition(x, y);