Upthrust - Game Project

Several programming assignments will revolve around creating a 2 player and ultimately a computer that can play the game Upthrust. This is a now-defunct game that was once produced as a board game. You can read about it and see pictures at Boardgame Geek: https://boardgamegeek.com/boardgame/2731/upthrust. It is not necessary to purchase, but if you feel so inclined there are some versions on ebay.

Game Rules

The game consists of a playing board with four columns and 11 rows that form a grid. The top six rows of the grid are scoring rows. Pieces are played in the spaces within the grid. There are four pieces of four colors (Green, Red, Blue, Yellow) that are initially placed on the board in prespecified locations.

In the two player game, each player initially picks two random colors and one player is selected to move first. Players alternate turns, and on each turn that player may move any piece that is one of the selected colors.

The initial state of the board is shown below.

     60  . . . .
     40  . . . .
     30  . . . .
     20  . . . .
     10  . . . .
         . . . .
         . . . .
         G R B Y
         R B Y G
         B Y G R
         Y G R B

Rules of Play

On a turn, a player moves one of his/her pieces straight up the board -- always staying in its column. The movement is governed by the following rules:

  1. A piece must move exactly as many spaces up as there are pieces in the horizontal row from which it departs. Thus, if there are two pieces in a row, either piece may move up exactly two spaces. After one piece is moved, the other may only move up one space since it has become the solitary piece in the row.
  2. Only one piece may occupy a space. Pieces may jump over other pieces, as long as they land on empty spaces.
  3. The most advanced piece of a color may not make a single space move. Therefore, a piece that is alone in a row cannot move if the other three pieces of the same color are below it on the board.
  4. On any of the bottom six rows of the board (the non-scoring rows) two pieces of the same color may NEVER be in the same row at the same time. This restriction does not apply to the five scoring rows.
  5. If a player is not able to move any of his/her pieces, that player loses that turn. But at later turns, moves may become available.
  6. Even when a piece has reached the scoring zone, it can continue to move up the board with regard to rules 1-3.

The game ends when:

  1. No player is able to make a legal move
  2. Only two pieces remain outside the scoring zone
The winner is the player whose pieces total the highest.