Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

09_Minesweeper

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which line of code gives a 15% probability that an element is a mine?

a)

Random.Range (1, 15);

b)

Random.value < 0.15%;

c)

Random.value < 0.15;

d)

Random.value < 15%;

2.

public Sprite[] emptyTextures; is a/an ______.

a)

Texture

b)

String

c)

Array

d)

GameObject

3.

Using the given code, On what line would you add the code to make the scene change if the player lost?

a)

18

b)

26

c)

42

d)

46

4.

Using the given code, On what line would you add the code to make the scene change if the player won?

a)

18

b)

26

c)

42

d)

46

5.

Using the given code, Line 22 is referencing what?

a)

The Grid you created in the game scene

b)

The Game Scene called Grid

c)

A function previously created in the Element Script

d)

The function uncoverMines in the Grid script

6.

On Line 33 of the given code, the variable "x" can be used throughout the script.

a)

True

b)

False

7.

In the given code, if "mine" is true, which lines of code will run?

a)

Lines 21 - 46

b)

Lines 21 - 26

c)

Lines 32 - 42

8.

Choose the correct answer that correctly declares a function. (Unity and C# has a specific naming convention)

a)

void Drive()

b)

Void Drive()

c)

void _Drive()

d)

void _drive()

9.

Choose the correct answer that correctly declares the int variable. (Unity and C# has a specific naming convention)

a)

Integer myInt

b)

int myInt;

c)

int MyInt

d)

int My_int

10.

Method parameters are enclosed in parentheses and are separated by colons.

a)

True

b)

False