Skip to content
Board game in C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
LICENCE
Makefile
README.md
TODO

README.md

Conqueror

Conqueror is a strategy board game where each players must own as much cells of the board as possible.

For the moment the game can only be played in CLI mode.

Rules

Environment

The board can be represented as a graph. Each player starts on a randomly chosen cell.

Turns

On each turn, the current player must move some of his pawns from one of his cells to a neighbour cell. The turn is separated in 3 steps:

Selection of the cell to leave (source cell):

First, the player must choose a cell among those he owns. For that the player can do the following commands:

  • cells: to list the cells he owns,
  • neighbours #: to list the neighbour cells of the cell #,
  • cell #: to choose the cell # as source cell.

Examples:

Choose a cell to leave

Command: cells
Cell 2: 8 pawns

Command: neighbours 2
Cell 1: owned by Player 1 with 8 pawns
Cell 3: owned by nobody with 0 pawns

Command: cell 2

Selection of the cell to go to (destination cell):

Then, the player must choose a cell where he'll move pawns. The destination cell must be a neighbour of the source cell. For that the player can do the following commands:

  • cells: to list the neighbour cells of the source cell,
  • cell #: to choose the cell # as destination cell.

Examples:

Choose a cell to go to

Command: cells
Cell 1: owned by Player 1 with 8 pawns
Cell 3: owned by nobody with 0 pawns

Command: cell 3

Selection of the number of pawns to move:

Thirdly, the player must select the number of pawns he wants to move. This number must be higher than 1 and lower than the number of pawns being on the source cell. Here, the player just has to type a number.

Examples:

Choose a number of pawns to move between 1 and 7
Number of pawns: 4

If the destination belongs to nobody, the current player become its owner, and the selected number of pawns are moved from the source cell to the destination cell.

If the cell belongs to another player, a fight occurs.

Fights

If a player moves pawns on a cell owned by another player, a fight occurs. The result of the fight depends on the number of pawns involved on each side (those brought by the current player and those being on the cell).

The winner of the fight is the player having the higher number of pawns. If both players have the same number of pawns, the fight result is a draw.

  • If the fight is a draw, nothing happens, no player lose pawns.
  • If the current player wins the fight, the cell becomes his and the pawns he moved are set on the cell. The other player loses the cell and the pawns he had on it.
  • If the current player loses the fight, he loses the pawns he tried to move. The other player cells and pawns are unchanged.

End of the game

The game ends when no player can play anymore or if one player is remaining in the game.

Dependencies

The game has no special dependencies.

Usage

To compile the game, run:

make

To play, run:

./bin/conqueror
You can’t perform that action at this time.