Variables
Sprites
Random Numbers
Shapes
100

What does the var keyword do?

Declares a variable

100

How do you create a sprite in the game lab?

var sprite = createSprite(200, 200);

100

What are the parameters for the random number function?

Minimum and Maximum

AKA the range

100

What shape does the rect() function draw

A rectangle

200

TRUE/FALSE

Variables are not case sensitive

False

200

What does the Sprite.setAnimation(""); function do?

Sets the image or animation for the sprite.

Use the Animation tab to load and label images and animations for your sprites.

The default image is a gray rectangle.

200

TRUE/FALSE

Random numbers must be assigned to a variable

FALSE

The randomNumber function simply returns a number, which can be directly set to a parameter as well as a variable

200

What function is used to add color to a shape?

fill();
300

TRUE/FALSE

You need to use the "var" keyword every time you call a variable.

FALSE

You only need to use it once, preferably at the top when you first instantiate it

300

What does this function do?

Sprite.x = 200;

Changes the x-position of the Sprite

300

TRUE/FALSE

The range of a randomNumber can have negative numbers.

TRUE

randomNumbers generate integers, which can be both positive and negative

300

What does the stroke() function do to a shape?

Adds a border

400

TRUE/FALSE

Variable names can start with numbers

FALSE

They cannot start with numbers, but they can be anywhere else in the name

400

When do you call the drawSprites(); function? before or after creating a sprite?

After

400

TRUE/FALSE

A randomNumber's range can have a starting number that is bigger than it's ending number. EX: randomNumber(100,50);

FALSE

The range must start with the smaller number, and end with the bigger number

400

What kind of shape does the arc() function make?

A curved line

M
e
n
u