r/Python • u/JamzTyson • 1d ago
Showcase A Modular Framework for Custom Rock-Paper-Scissors games
I'd like to share the first Python project that I’ve taken from an initial idea all the way through to publishing on GitHub and PyPi. It's a modular framework for creating Rock-Paper-Scissors games and variants.
What My Project Does:
It is both a playable "Rock Scissors Paper" CLI game, and a flexible framework for building custom versions of the classic game. It's designed to:
- Support additional choices (e.g., Rock, Paper, Scissors, Lizard, Batman).
- Ensure consistent win-loss relationships based on the number of choices.
- Be easily extended for more complex variants.
Target Audience:
This project was primarily written for my own learning experience, though it may be useful for hobbyists to use as the basis of more complex Rock Scissor Paper games.
Features:
- Customizable Rules: Easily modify the choices and define which hands win.
- Extensible: Add as many options as you want (as long as they meet the rules).
- Simple Interface: Play a simple terminal-based game against the computer, or replace the UI class with a more complex interface.
- Unit tests: Game logic supported by pytests.
- Single Python file: Can easily be split into multiple modules for more complex versions.
First Release:
GitHub: https://github.com/JamzTyson/Rock_Scissors_Paper
PyPi: https://pypi.org/project/rock-scissors-paper-framework/
I'd love to hear your feedback on this project.
1
u/yrubooingmeimryte 1d ago
Why?