The Function gem (which happens to be a Ruby – and co-incidentally Ruby is also a programming language) once discovered on the GRID can be removed by the player and they then keep hold of the gem card to play at a later date (younger children tend to just like keeping hold of the card for the duration of the game, rather than using it - in fact we've seen games where the children just want to explore the board and the winner is whoever finds the most gems).
This card teaches children to structure their thoughts as per a computer function (and as they are filling in the blanks they are also needing to be creative). It also helps to teach children logical conditional statements (IF… THEN…) and loops (DO… UNTIL…).
A FUNCTION gem can only be used once.
When they player plays the FUNCTION gem, they must structure it in the following three ways:
- IF… THEN…
- In other words – IF something happens THEN do something
- For example: On the players turn they can say they are going to play their FUNCTION gem. They would hand the card over and then say ”IF i reveal a wall THEN turn left”
- Another example: ”IF i reveal a bug THEN remove the bug”
- If they reveal a WALL or a BUG their programme has failed and they return to where they were before playing the Function card. If they reveal the CPU then the normal rule for this card is played (i.e. the game is reset)
- If a player reveals another FUNCTION gem then they can remove it from the Grid and use it at a later time
- DO… UNTIL…
- In other words – DO something UNTIL something happens
- For example: On the players turn they can say they are going to play their FUNCTION gem. They would hand the card over and then say ”DO keep moving me forward UNTIL i reveal a wall”
- Another example: ”DO move forward and turn right UNTIL i reveal a wall” – this function would allow the player to move zig-zag across the Grid
- If they reveal a WALL or a BUG their programme has failed and they return to where they were before playing the Function card. If they reveal the CPU then the normal rule for this card is played (i.e. the game is reset)
- If a player reveals another FUNCTION gem then they can remove it from the Grid and use it at a later time
- RUN PROGRAMME
- This is similar to the Advanced version of the game
- On the players turn they can say they are going to play their FUNCTION gem. They would hand the card over and then say ”RUN PROGRAMME”. They then lay out every INSTRUCTION (using the left over Instruction cards) they want their Programme to follow in one turn. They then run their Programme through each step.
- If they reveal a WALL or a BUG their programme has failed and they return to where they were before playing the Function card. If they reveal the CPU then the normal rule for this card is played (i.e. the game is reset)
- If a player reveals another FUNCTION gem then they can remove it from the Grid and use it at a later time
There is no limit on how the player plays the FUNCTION gem as long as it conforms with the above structure – the more creative the better as far as we are concerned. In fact, as children master the game they will be even more creative in how they use the FUNCTION – for example, children may play two FUNCTION cards at the same time (they’re nesting their functions).