Skip to content

Disciple0fMarx/card_roulette

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸƒ Card Roulette

A Python package that simulates a thrilling card game where players draw cards, hoping to avoid the deadly one.

Description

Card Roulette is a text-based game where players draw cards in rounds. Each round, players draw cards randomly, and if a player draws the deadly card, they lose the round. The game introduces a new deadly card with each iteration (Iteration n's deadly card is card n). If the deadly card is the only one remaining, all players survive.

Rust Version

You can find the Rust version here.

Requirements

  • Python 3.6 or above

Installation

git clone https://github.com/Disciple0fMarx/card_roulette

Usage

cd card_roulette
python3 -m card_roulette

Playing a game

Default settings: 3 players, 3 rounds

python3 -m card_roulette play --players 4 --rounds 2

Simulating games

Default settings: 5 games, 3 players, 3 rounds

python3 -m card_roulette simulate --games 10 --players 4 --rounds 2

Results will be saved in the results folder like so:

results/
β”œβ”€β”€ 3_players/
β”‚   β”œβ”€β”€ 3_rounds/
β”‚   β”‚   β”œβ”€β”€ 020549a8-1daf-43c2-a0d9-b0a49e31d860.csv
β”‚   β”‚   └── ...
β”‚   └── 4_rounds/
β”‚       β”œβ”€β”€ a568cd44-9c4d-4ff2-a604-f100307040e4.csv
β”‚       └── ...
β”œβ”€β”€ 4_players/
β”‚   └── 2_rounds/
β”‚       β”œβ”€β”€ fe54d3d1-ff4e-41f0-a579-e22d208163ea.csv
β”‚       └── ...
β”œβ”€β”€ ...
└── total_results.json
  • <id>.csv contains the scores of all players in each game in the simulation with the given UID.
  • total_results.json stores the cumulative scores of each simulation.

About

Feel the thrill, avoid the kill

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages