Catch the mouse (with random backdrops)

Challenge Level: Growing experience

Learning outcomes

Students will be able to:

Requirement:

Remix the program provided at https://scratch.mit.edu/projects/161489068/ and change its name to: KidBots challenge 2.2 Catch the mouse (with random backdrops).

Give instructions to the “cat” to catch the “mouse” (avoiding the blue tiles) by altering the blocks under the block inside the “cat” sprite. You may only use the following custom blocks:

which are the custom blocks found under the "More Blocks" script.

  • When your instructions are complete, press the “Go” button.
  • To move the "cat" to the starting point (x: 200 y:-100), press the "Restart" button.
  • To change to a new background press the "Change background" button. Every time the "Change background" button is pressed, the program stamps blue tiles in 15 random locations inside the grid.

Testing examples:

Note that this version changes the backdrop every time you run the program; normally you would press the green button once, and then edit the program and press the "GO" button rather than starting the program again.

You will need to test that your program reaches the goal when you press the GO button.

Languages

Scratch

What it should look like

Recommended blocks
Hints
  • The custom block moves the “cat” sprite forward for the number of tiles entered as its input (i.e. move_forward(3) would move the “cat” sprite 3 tiles forward). The distance from the centre of one tile to a neighbouring tile is 50 steps long, so for this reason we have used a variable called “one tile” which is always set to 50.
  • The custom block rotates the “cat” sprite to the right 90 degrees.
  • The custom block rotates the “cat” sprite to the left 90 degrees.
  • When your set of instructions are complete, press the “Go” button. If your instructions were incorrect (i.e. the cat didn’t catch the mouse), press the “Restart” button and start over.
  • The “cat” sprite can not go through the blue tiles. If your instructions takes the “cat” over any of the blue tiles, you will hear a crash sound with a message instructing you to press the “restart” button and start again.
  • To change to a new background press the "Change background" button. Every time the "Change background" button is pressed, the program stamps blue tiles in 15 random locations inside the grid.

Show solution