Skip to main content

A simple and fun rock-paper-scissors CLI game with score tracking

Project description

chanwookim-rps

A simple and fun rock-paper-scissors CLI game written in Python with score tracking and interactive gameplay.

Features

  • 🎮 Interactive terminal-based rock-paper-scissors game
  • 📊 Score tracking across multiple rounds
  • ⌨️ Support for multiple command aliases (game/play, help/rules, exit/quit)
  • 🎯 Simple CLI entry point after installation (rps)
  • ✅ Fully tested with unit tests

Prerequisites

  • Python 3.8+

Installation

From PyPI (Recommended)

pip install chanwookim-rps

From GitHub repository

pip install git+https://github.com/chanwookim0716/chanwookim-rps.git

Local Installation

Navigate to the project root directory and run:

pip install --user .

For Development (Editable Install)

Navigate to the project root directory and run:

pip install -e .

Usage

Quick Start

After installation, simply run:

rps

In-Game Commands

Main Menu:

  • game or play - Start a new game
  • help or rules - View game rules
  • exit or quit - Exit the game

During Game:

  • scissors, rock, or paper - Make your choice
  • quit or exit - Return to main menu

Example Gameplay

Rock-Paper-Scissors Game
Menu | game | help | exit |
: game

Menu | quit | Current Score: 0
Choose: scissors, rock, or paper : rock

==================== Result ====================
Your choice: rock
Computer's choice: scissors

Result: You win!
Current score: 1
================================================

Development

Project Structure

.
├── src/
│   └── chanwookim_rps/
│       └── __init__.py          # Main game logic
├── tests/
│   ├── test_rps.py              # Unit tests
│   └── _test_rps_runner.py       # Integration test runner
├── README.md
├── CHANGELOG.md
├── LICENSE
└── setup.cfg

Running Unit Tests

To ensure the core game logic is working correctly:

python -m unittest tests/test_rps.py -v

Running the Test Runner

A simple test runner (with scripted inputs) is available:

python tests/_test_rps_runner.py

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

See CONTRIBUTING.md for more details.

Changelog

See CHANGELOG.md for a list of all versions and changes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

  • chanwookim0716 - Initial work and maintenance

Enjoy the game!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chanwookim_rps-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chanwookim_rps-0.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file chanwookim_rps-0.1.0.tar.gz.

File metadata

  • Download URL: chanwookim_rps-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for chanwookim_rps-0.1.0.tar.gz
Algorithm Hash digest
SHA256 22dbfd430786db19355b792f3d391f3be6e3f4c49f56cc448f0c8f57cc042f80
MD5 5e6a29c6a24fc5bf5051c644f9ad6916
BLAKE2b-256 237390e99164271ab9574b4ba18e01ee4ea6d9e06a4ef0cbad67f1a00b82081b

See more details on using hashes here.

File details

Details for the file chanwookim_rps-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: chanwookim_rps-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for chanwookim_rps-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eeeaf12f8474b64e701a6b7da8c834542888b4456c8b758b39683da4d80f81e1
MD5 22601adce67072cf638f17d3ce3e56c1
BLAKE2b-256 209c95e0b40021e7ba52497ce40fbfa6e4e9aa3b32231527865c0281b5640377

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page