Skip to content

rsp224/CSMEng_CoupProject

Repository files navigation

MyCoup

A web-based implementation of the popular card game Coup. Play against AI opponents in this strategy game of deception, bluffing, and political intrigue.

About Coup

Coup is a card game where players compete to be the last one standing by eliminating their opponents' influence cards. Players can take various actions, claim character abilities (even if they don't have them!), and must strategically decide when to bluff and when to call others' bluffs.

Features

  • Single-player mode against 2-5 AI opponents
  • Interactive UI with visual card representations and action icons
  • Full game mechanics including:
    • Basic actions (Income, Foreign Aid, Coup)
    • Character-specific actions (Tax, Assassinate, Steal, Exchange)
    • Challenge and Block systems
    • Bluffing mechanics
  • Visual feedback for all game actions and events
  • Responsive design that works on desktop and mobile devices
  • AI opponents with strategic decision-making

How to Play

Getting Started

  1. Open index.html in your web browser
  2. Select the number of players (2-6 total, including yourself)
  3. Click "Start Game" to begin

Game Setup

  • Each player starts with 2 influence cards (face-down) and 2 coins
  • There are 5 character types, each with unique abilities:
    • Duke - Take 3 coins (Tax), Block Foreign Aid
    • Assassin - Pay 3 coins to assassinate another player
    • Captain - Steal 2 coins from another player, Block Stealing
    • Ambassador - Exchange cards with the Court deck, Block Stealing
    • Contessa - Block Assassination

Actions

On your turn, you can take one of these actions:

General Actions (Available to everyone)

  • Income - Take 1 coin from the Treasury
  • Foreign Aid - Take 2 coins (can be blocked by Duke)
  • Coup - Pay 7 coins to force a player to lose an influence (cannot be blocked or challenged)
    • Note: You MUST coup if you have 10 or more coins

Character Actions

  • Tax (Duke) - Take 3 coins from the Treasury
  • Assassinate (Assassin) - Pay 3 coins to force a player to lose an influence (can be blocked by Contessa)
  • Steal (Captain) - Take 2 coins from another player (can be blocked by Captain or Ambassador)
  • Exchange (Ambassador) - Draw 2 cards from the Court deck, then return 2 cards

Challenges and Blocks

  • Challenge - If you think someone is lying about having a character, you can challenge them
    • If they're lying: They lose an influence
    • If they're telling the truth: You lose an influence and they shuffle their card back
  • Block - You can claim to have a character that blocks an action (can also be challenged)

Winning

Be the last player with at least one influence card remaining!

Project Structure

mycoup/
├── index.html          # Main game file (HTML, CSS, and JavaScript)
├── images/
│   ├── actions/        # Action icon images
│   │   ├── coup.png
│   │   ├── income.png
│   │   ├── foreignaid.png
│   │   ├── tax.png
│   │   ├── stealing.png
│   │   └── exchange.png
│   ├── ambassador.png  # Character card images
│   ├── assassin.png
│   ├── captain.png
│   ├── contessa.png
│   ├── duke.png
│   ├── coin.png       # Coin icon
│   └── bot[1-5].png   # AI player avatars
├── rules/
│   └── rules.txt      # Detailed game rules
└── README.md          # This file

Technical Details

  • Pure HTML/CSS/JavaScript - No dependencies or build process required
  • Responsive design - Adapts to different screen sizes
  • Local gameplay - Runs entirely in the browser, no server needed

Game Tips

  1. Bluffing is key - You don't need to have a character card to claim its action
  2. Watch your coins - Having 10+ coins forces you to Coup
  3. Challenge strategically - Wrong challenges cost you an influence
  4. Block when necessary - Especially block Foreign Aid if you claim Duke
  5. Use the Ambassador - Exchange is great for getting better cards and bluffing

Future Enhancements

Potential features for future development:

  • Multiplayer online mode
  • Different AI difficulty levels
  • Game statistics and history
  • Sound effects and animations
  • Custom game rules/variants

Credits

Based on the card game Coup by Rikki Tahta, published by Indie Boards & Cards.

License

This is a fan-made implementation for educational and entertainment purposes.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors