Go to file
2022-05-20 13:26:26 -05:00
src Add in choose action phase 2022-05-20 13:26:26 -05:00
.gitignore Implement resolution phase 2022-05-17 16:10:56 -05:00
Cargo.lock Implement resolution phase 2022-05-17 16:10:56 -05:00
Cargo.toml Implement resolution phase 2022-05-17 16:10:56 -05:00
LICENSE GPL 2022-05-18 11:18:35 -05:00
README.md Add readme, action challenges, admit that I did it totally wrong 2022-05-18 17:47:33 -05:00

Coup

Coup from a Programmers Perspective

Coup is played in turns, each players turn consists of phases, many of which are skipped depending on the cards.

  1. First player chooses an action that they have the coin to perform, and possibly a target for that action (Action Phase)

  2. If the action requires an identity, all players are given an option to challenge the action (Action Challenge Phase). If there is as challenge and it is successful it ends the first players turn and they lose influence. If there is an unsuccessful challenge the challenger loses influence, and the turn continues. If there is no challenge play continues.

  3. If the action is a blockable action and a targeted action then the target may or may not block. If the action is blockable and there is no target, all players may block (Block Phase).

  4. If there is a block, the first player may choose to challenge the block. (Block Challenge Phase) If there is a challenge and it is successful, the blocker loses influence and the first player's turn resolves. If there is a challenge that is unsuccessful, the first player loses influence and the turn ends. If there is not challenge the turn ends.

  5. The player's action is resolved (Resolution phase)

TODO

  1. Remove coins as part of the resolution phase
  2. Add checks so dead players don't lose influence
  3. Assert that no illegal actions can be performed by the agents
  4. Re-order phases such that challenges come after counter-actions and can be performed by any player