Players must replicate a drawing on the whiteboard by calling functions.
Place each of the function calls for drawing geometric shapes on the function call board as follows:
Explain to all players what function calls are:
"Let's call the functions for drawing shapes: If we call the 'draw circle' function, we will draw a circle on the whiteboard. If we call the 'draw line' function, we will draw a line on the whiteboard. If we call the 'draw triangle' function, we will draw a triangle, etc."
Make sure the players understand by asking, "What happens if we call this function?" and "What happens if we call this other one?"
Then, the youngest player choose a drawing tile from among the tiles available on the first pages of this manual (house, girl, bird, locomotive).
Example: The player chooses the 'house' drawing.
The player must answer the question: "What shapes can we decompose the drawing into?"
Example: "The roof is a triangle, the door is a rectangle, the chimney is a rectangle, the smoke consists of 3 circles, the tree consists of 5 lines and curves, etc."
Once the drawing is decomposed, one of the players calls the functions to draw a shape, and the other player draws it on the whiteboard with the marker. You continue this process until the drawing is complete.
Example:
Player 1: "Calling the 'draw triangle' function."
Player 2 draws a triangle as a roof.
Player 1: "Calling the 'draw rectangle' function."
Player 2 draws a rectangle as walls
Player 1: "Calling the 'draw rectangle' function."
Player 2 draws a rectangle as a door
Player 1: "Calling the 'draw circle' function."
Player 2 draws a circle as a window
The game ends once you have completed the drawing.
You can play again, but this time reverse the roles, let the other player call the functions.
Variant: The player chooses a drawing card from those without defined geometric shapes.
Ask the same question: "What shapes can we decompose the drawing into?" Once the question is answered, call the necessary functions to make the drawing as in the previous example.
You can use other available function calls.
There are also "blank" tiles that you can use to invent calls to new functions. Write on these tiles using the marker.
In a very simplified way, you have learned to decompose and call functions to perform different tasks.
What is decomposition? Decomposition is breaking down a problem into smaller problems to make execution easier. For example, if you want to draw a house, you first associate each part of the house with a basic geometric shape, and then you draw each part of the house using those basic shapes.
What is a function call? A function is a block of code that contains a series of instructions to perform a task, such as "draw a circle". When a function call is made, the program executes that function, which in the example draws a circle.