Getting Started Guide

CLASS 4
42
Introduction
Mole Game
Coding the mole game (Principle)
The mole game is a game that allows the user to score by pressing the IR sensor (Infrared sensor) according to the
number from the scratch program in the range of 1~6.
In the mole game, you need to use the 7 IR sensors we learned in previous lessons. One IR sensor has the job of
activating the game, and the rest have numbers 1~6 assigned. Remember this as you start the coding.
Before we go ahead and start coding, we will go over the things you need to keep in mind when coding. It is really
important to have an overall guideline of what to express and how to express them before you start actual coding.
Let's take a quick look at the basic operations we need to implement.
1. Activate the game when the IR sensor plugged in the 8th port is pressed.
2. When the game begin, S4A program of the computer randomly calls a number from 1~6.
3. Score a point when the specific, assigned IR sensor is pressed before the set time. Then continues onto calling
next number.
4. If the assigned IR sensor is not pressed, announce that the game is over and stop the script.
Now shall we start making the mole game?