game-of-pure-strategy
v3.0.0
Published
game-of-pure-strategy
Readme
📦 game-of-pure-stratergy
A simple Node.js-based CLI tool that simulates a card game to generate large datasets in CSV format.
This tool is useful for generating test data for machine learning, analytics, or simulations.
🚀 Installation
npm install game-of-pure-stratergy🧾 Usage
npx generateDataThis command will:
- Simulate multiple rounds of the game
- Write the results to a
data.csvfile in your current working directory - Automatically append data if the file already exists
🃏 Game Logic
Each round:
- Uses three shuffled decks: one for player A, one for player B, and one as the draw pile.
- Players bid one card each, and a draw card is revealed.
- The player with the higher bid wins the draw card points (+ any pile points from previous ties).
- If both bids are equal, the card's points go to a tie pile.
- Points are updated and recorded for each turn.
🗃️ Output Format
The output CSV file (data.csv) contains the following columns:
Drawing Card,Player A Bid,Player B Bid,Player A Points,Player B PointsSample Output:
7,10,5,7,0
9,3,9,7,9
4,2,1,11,9
...📂 File Location
The CSV file is created in the current working directory where the command is executed:
/path/to/current/folder/data.csv📝 License
MIT
