Hubbub! Coding a First Nations’ Game of Chance

0
Hubbub! Coding a First Nations' Game of Chance

 

Today I learned about Hubbub – a game of chance played using stones or other everyday objects that have two sides. The game was brought to my attention by two teachers enrolled in my Trent University Math courses. After much research, I have found there are a variety of implementations of the game depending on multiple factors. I decided I was going to attempt to code a simulated version of the game using Scratch. This project is based on the information found here.

Screen Shot 2017-07-19 at 1.18.58 PM

The game is played by two people or teams. Each team takes a turn in rolling the “dice” (stones or other items). Each stone has a blank face and a marked face. There are five stones in total. Two stones are marked with an X while the other three are marked with a star. Stones are thrown into a bowl and points are calculated as follows (this is where I found a few variations of the game):

  •  All blanks = 1 point
  •  2X’s (and a combination of blanks and stars on the other dice) = 3 points
  •  3 stars (and a combination of blanks and Xs on the other dice) = 3 points
  •  5 marked sides up = 8 points
  •  Anything else = 0 points

Points are calculated using sticks. Fifty sticks are required (this seems to vary as well) and players take sticks corresponding to their points after each roll. When the sticks are gone, the game ends and each player (or team) counts their sticks.

In my Scratch game, players take turns by clicking their corresponding “Roll!” button – player one is red while player two is blue. Each stone has two costumes as per the game and I use the random number generator for each. I’m certain my solution isn’t the most efficient but it does work. Isn’t that a part of the beauty of coding? Natural differential and more than one way to solve a problem.

Screen Shot 2017-07-19 at 1.23.27 PM

After each roll, messages are broadcasted based on variables to alter the costumes of each die or stone.

Screen Shot 2017-07-19 at 1.24.40 PM

The algorithm for keeping score is based on the bulleted list above.

Screen Shot 2017-07-19 at 1.25.45 PM

Since each variable is set to 0 or 1, I can quickly check which costume to display and determine if points should be awarded. For example, three stars might mean variable 3, 4 and 5 are all equal to 0.

Here is a quick video of the game in action:

If you wish to play (and remix) yourself, check out the project page here.

If you can help me with more information on the history of the game or other ways to keep score, I’d love to know.

For more lessons, activities and ideas, grab a copy of my book, Code Breaker, on Amazon here!

(Visited 1,790 times, 1 visits today)

Leave a Reply

Name
Name*
Email
Email *
Website
Website