subject

8.1.4: Ghost Invasion! Program Result

Overview
Write a program to draw multiple ghosts on the screen. You must do this by writing a function called drawGhost, which takes three parameters, the center x location of the ghost, the center y location of the ghost and the color of the ghost.

function drawGhost(centerX, centerY, color){

}
Final Product
Here is a screenshot of a sample run of the ghosts program with these function calls.

function start(){
var centerX = getWidth()/2;
var centerY = getHeight()/2;
drawGhost(centerX, centerY, Color. red);
drawGhost(100,100, Color. green);
drawGhost(300, 200, Color. black);
drawGhost(40, 300, Color. orange);
drawGhost(300, 50, Color. yellow);
}
Why not try adding more calls and more ghosts?
screenshot

Hints
BIG HINT: Use the drawCircle function we wrote earlier in this example!
The constants for all of the ghost dimensions are given.
cx and cy for the ghost define where the center of the head should go

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:50
Answer the following questions regarding your system by using the commands listed in this chapter. for each question, write the command you used to obtain the answer. a. what are the total number of inodes in the root filesystem? how many are currently utilized? how many are available for use? b. what filesystems are currently mounted on your system? c. what filesystems are available to be mounted on your system? d. what filesystems will be automatically mounted at boot time?
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Which of these is an example of an integrated presentation? a. a table created in powerpoint b. an image pasted into powerpoint c. a caption created in powerpoint d. an excel chart pasted into powerpoint
Answers: 1
question
Computers and Technology, 24.06.2019 12:50
When is it most apprpriate for a development team to change the definition of done
Answers: 1
question
Computers and Technology, 25.06.2019 04:00
Use the wrap text icon to modify which graphic appears in the front of layered images modify the picture effects change the way text is wrapped around an object apply wordart to the text
Answers: 1
You know the right answer?
8.1.4: Ghost Invasion! Program Result

Overview
Write a program to draw multiple...
Questions
Questions on the website: 13722367