8.11.1.5

The Q Game 🔗 ℹ

Matthias Felleisen

image

The game is inspired by Qwirkle. the actual game may help develop some intuition but the physical game and the implementation differ.

Most of the time when we discuss ideas, the words “referee”, “player”, and so on refer to software components not people. To remind you of their inanimate nature, it is best to use “its” or “it”—as in “its game pieces” or “it’s taking its turn.”.

Informal Overview

The Q game is a tile-based game for 2 to 4 players. These players place the tiles on an infinitely large “table.” The square shape of the tiles and the rules of the game induce the notions of row and column on the evolving map formation.

Players place tiles according to rather basic rules. Every placement yields a certain number of points. When a player can use all of its tiles during a single turn, the game ends. The game also ends when all game tiles have been placed or all players pass during a round.

The player with the highest total score wins.

Game Pieces

Our version of the game comes with 36 kinds of tiles:

   

red

   

green

   

blue

   

yellow

   

orange

   

purple

star

   

image

   

image

   

image

   

image

   

image

   

image

8star

   

image

   

image

   

image

   

image

   

image

   

image

square

   

image

   

image

   

image

   

image

   

image

   

image

circle

   

image

   

image

   

image

   

image

   

image

   

image

clover

   

image

   

image

   

image

   

image

   

image

   

image

diamond

   

image

   

image

   

image

   

image

   

image

   

image

Altogether there are a total of 1080 tiles, 30 of each kind.

Setting up the Game

The referee hands each player six randomly chosen tiles. It then places one tile on the “table.” Once this first tile is placed, the players take turns in descending order of age, starting with the oldest.

The players do not tell each other which tiles they own.

The current scores of the players is public knowledge as is the number of remaining tiles and the order in which they take turns.

Playing a Turn

When granted a turn, a player may take one of the following three actions:
  1. pass;

  2. exchange all of its tiles for new ones, which is only possible if the referee still has enough tiles;

    The referee hands back the same number of tiles, drawn from its own (randomly arranged) collection.

    The returned tiles are added to the end of the referee’s collection of tiles, to be handed out in the future as needed.

  3. place at least one tile or several tiles, which are then added to the map in sequential order.

    A placement of tiles must satisfy these conditions:
    • every tile placed must share a side with at least one tile on the map that it extends;

    • every tile placed must match the colors of all its immediate (up/down, left/right) neighbors (if any) along a line (row, column) or it must match all the shapes of all its immediate neihgbors along a line;

    • every tile added to the map must simultaneously match both of its immediate neighbors along its row and column, separately, in terms of either shape or color;

    • all tiles placed during a turn must be in the same row or column, though not necessarily adjacent to each other.

    The referee hands the player as many tiles as it placed, drawn from its randomly arranged collection or all remaining tiles if the player placed more than the referee has left.

The referee eliminates any player that violates any rules during a turn. The tiles in the hand of the eliminated player get appended to the referee's tiles.

Scoring a Turn A player that passes or exchanges its tiles receives no points.

If the player requests a placement, the referee checks whether it is legal and constructs the extended map. Based on this new map, the referee assigns points for a turn as follows:
  • A player receives one point per tile placed.

  • A player receives one point per tile in a contiguous sequence of tiles (in a row or column) that contains at least one of its newly placed tiles extends.

  • A player receives 6 bonus points for completing a Q, which is a contiguous sequence of tiles that contains all shapes or all colors and nothing else.

  • A player also receives 6 bonus points for placing all tiles in its possession.

The referee keeps track of the scores on a per turn basis and shares the scores of all players with the player to whom it grants a turn.

Ending a Game

The game ends if one of the following condition holds:

  • at the end of a round if all remaining players pass or replace their tiles;

  • at the end of a turn if a player has placed all tiles in its possession; or

  • there are no players left after a turn.

Once a player has requested the placement of tiles, the current round of turns cannot end the game even if this player drops out (for whatever reason) and even if all other players pass or request exchanges.

Sample Placements

(check-equal? (fits image P1 image) image)

(check-equal? (fits image P1 image) #false)

(check-equal? (fits image P2 image) image)

(check-equal? (fits image P2 image) #false)