Saturday, October 24, 2015

Code Master – Programming Logic Game

Even though young people are sometimes
called “digital natives,” most use computational
devices simply to browse, chat, run apps, and play games.
It is as if they can “read” but not “write.”
Dr. Mitchel Resnick,
Professor of Learning Research
MIT Media Lab
   In February of this year I wrote a post featuring Robot Turtles, a board game published by Thinkfun®.
   Robot Turtles is all about sequencing, a basic concept in learning to code. As even a four-year old knows, you don’t put your shoes on before your socks! Here’s a link to the Robot Turtles post.
   A great follow up to Robot Turtles is Code Master, a board game that teaches a larger set of  fundamental coding concepts that all programmers, young or old, know and use. These concepts, such as looping, iteration, and conditionals, are found in one form or another in all programming languages. In its board game format Code Master doesn't require a computer or a tablet to play and therefore doesn't report to the player (programmer) those dreaded syntax errors the programmer meet when coding at a keyboard. Best of all, Code Master is easy to understand and play because the actions in the game are described using everyday terms like run. slide, and jump.
   I have taught computer programming since the early 1980s. A large number of students were interested in programming during those early, exciting, days as more and more parents bought home computers. Kids typed in programs—mostly games—they found in popular magazines and in the process taught themselves how to program in BASIC (Beginners All-purpose Symbolic Instructional Code). Those kids were the real digital natives because they could both read and write. They grew up to fill the computer science classes in our colleges and universities and were there to power the tech booms. Now, enrollment in computer science classes in the United States is down and, as the professor says, a dwindling number of young people can write code.
   As a parent, grandparent, aunt, uncle, or just friend to a youngster, you can give that boy or girl the gift of being able to write code. If the youngster is at least fours old, start with Robot Turtles. For ages 8 to adult, have them play Code Master. Better yet, play with them!
   The components of the Code Master are shown in the following photograph. The easiest way to describe the role of each component is to play the first game in the first level.

   The game board on which the pieces are placed and moved is called a Game Map. There’s a spiral-bound set of 10 maps. Pictured below is a diagram of Map 1, as it's shown in the above picture.
   Instead of writing a line of code, tokens, like those shown below, are used as instructions that move the player's piece on the map.
   Each map is used to play 6 different games of varying levels of difficulty. The four difficulty levels are color-coded. There are 15 games at each level for a total of 60 different games.
Set Up a Level           
   Let’s set up Map 1 to play the first Level 1 game. In the upper left corner of the map is a box (see A in the diagram below) with instructions for setting up the map to play the game (see B).
The left side of the box tells us to place the player’s piece on number 5 and the portal on number 3 as shown in B. The goal is to get the player from number 5 to the portal at number 3.
Write Your Program
   The colored circles on the right side of the box tells us to select two red run tokens and two green slide tokens and go to Scroll 1 in the spiral-bound book of 12 Guide Scrolls.
   The Guide Scroll is actually a flow chart that describes the flow of logic in the program. Once the run and slide tokens are placed on the guide scroll, the scroll becomes the program.
   After studying colored lines connecting the numbered circles on Map 1, let’s assume we decide to place the tokens on the scroll as shown in the following diagram.  We’ve now written a program.
Run Your Program
   Remember, the goal of the program is to get the player from position 5 to the portal at position 3.
   The first token in the Guide Scroll moves our player by running along the red line connecting position 5 and position 2 (see A in the diagram). The next token on the scroll is green therefore our player slides along the green line to position 0 (see C). 
   The third line of the program moves the player along the red line to position 1 (see D). The last token in the program directs our player to slide along the green line to position 3, the position of the portal (see E).
   Our program works! If the program hadn’t moved our player piece from position 5 to the portal then we would have needed to debug the program to find the error in the logic. As you move up through the levels you will meet soon meet the need to debug. Even professional programmers seldom write clean, bug-free code, the first time so accept debugging as a necessary programming activity.
   As the player progresses through the Levels new tokens are introduced. These tokens open up new programming concepts used to solve more difficult problems. For example, the important conditional piece of code called the If [condition true]… then [Yes] Else [No] is represented by this hex-shaped token.
   Regular readers of this blog know that I recommend educational computer games and board games that are especially suited for adults to play with kids and Code Master is a game best played with kids, grand kids, or anyone interested in learning the fundamentals of coding.
   With the Holiday season fast approaching, Code Master will make a wonderful gift to be played in front of a warm fire, with a hot cup of cocoa, in the company of family and friends.
  You can find Code Master in Target stores or on for $19.99 (currently on sale for $17.99).

No comments:

Post a Comment