Skip to content

Details

For our next meetup we will program the following game:

GAME #1 -- STRIKE NINE (one player vs. computer)

Description:

  1. The player has a game board with all numbers from 1-9 visible (inclusive).
  2. The computer rolls two six-sided dice and presents the TOTAL to the player.
  3. The player then may remove ANY combination of one or more numbers from his or her board that add up to TOTAL.

For example, if computer rolls a TOTAL of 9, player can choose to remove any of the following combinations: [9 ] , [1 ,8], [2,7], [1,2,6], [2,3,4], etc.

4) The numbers so chosen are then permanently removed from play.

5) Once this is done, the computer rolls again and play continues.

PLAYER WINS if he or she removes all their numbers from the board.

PLAYER LOSES if the computer rolls a total that the player cannot remove with the numbers remaining on their board.

I like this game because there is a simple, straightforward logic to it, and there are lots of ways to incorporate buttons, simple event handlers, toggles to change whether a number is still available for play or not, etc. that force the developer to learn basic DOM manipulation techniques.

If you want to think about the problem before showing up to the meetup that is ok but certainly not necessary. The point of this meetup is to sit down in groups and learn what you need to learn to attack the problem(s) at hand then and there!

Members are also interested in