30 lines
1.5 KiB
Markdown
30 lines
1.5 KiB
Markdown
# 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
|