← Back to course
Code Crew G3 / Week 12 / Wednesday
3/6
Week 12 Β· Computational Thinking

Wednesday

// Design your board game

Wednesday: Write the Rules

"Rules are easy," Rocket says. "Just roll and move!"

Raven taps the board. "What happens if you land on a special square? How do we keep score?"

Nova hums. "Every turn repeats. That sounds like a loop," she hints. Rocket grins. "And the score can be a variable!" Let's write the rules for your game.

Write the rules using IF / ELSE (Week 3) and LOOPS (Week 2).

Use VARIABLES (Week 4) for each player's score, lives, or position.

Each player has variables: ___________________________________
On your turn (LOOP, repeat each turn):
Step 1: ____________________________________________
Step 2: ____________________________________________
Step 3: ____________________________________________
IF you land on a special square: ____________________________
ELSE: ____________________________________________________
The game ends WHEN: __________________________________

Functions & Algorithms

Pick TWO things players do often, then give each a NAME (function, Week 5).

Pick the BEST way to decide a winner (algorithm, Week 7).

Function 1: __________() β†’ ___________________________
Function 2: __________() β†’ ___________________________
How we decide a winner: ________________________________
β—‡ PARTNER MOVE
Read your rules out loud to a partner.
Did anything sound CONFUSING? That's a BUG (Week 6) in the rules.

Rules Check

CODE IN YOUR RULES
  • Read the question.
  • Tap your answer.
position starts at 0. You roll 3, then 4. What is position?
IF you land on a ladder, climb 3. You land on a ladder at square 5. Where do you go?
REPEAT UNTIL someone reaches END: take a turn. When does the game stop?
take_turn() means roll, move, then check the square. What is take_turn()?

Quick Check

Score starts at 0. Each turn, score goes up by 2. The loop runs 3 turns. What is score now? ____
Then the rule says: IF score is more than 5, say You win. ELSE say Try again. What does the game say? ____
← Tuesday