Welcome to the Card Game War project! This project provides a secure, cross-platform implementation of the classic card game "War" with a graphical interface and encrypted results storage.
How it works:
- Key files (
war.py, etc.) are obfuscated and require thepyarmor_runtime_007668runtime folder to run. - The runtime is included in the project and loaded automatically.
- This helps protect your code and intellectual property.
How to use:
- Run scripts as usual (e.g.,
python war.py). - Do not delete or move the
pyarmor_runtime_007668folder.
| File | Purpose |
|---|---|
war.py |
Main GUI for playing War. Handles game logic, encryption, user input. Obfuscated with Pyarmor. |
generate_key.py |
Generates a secure Fernet key for encrypting results. |
decrypt_results.py |
Decrypts and reads the encrypted results file. |
win-results.json |
Stores encrypted game results. |
win-results.key |
Stores the Fernet encryption key. |
- Install Python 3.11.9
- Download Python from the official website: python.org/downloads
- Run the installer and check "Add Python to PATH" during setup.
- Verify installation:
python --version
- Most Linux systems already come with Python pre-installed. You can use the default version that comes with your distribution.
- If you are having issues download the Python Version
3.11.9. - To check your Python version:
python3 --version
- If you need to install or upgrade Python, use your package manager (example for Ubuntu/Debian):
sudo apt update sudo apt install python3 python3-pip python3 --version
- Download Python from python.org/downloads
- Or use Homebrew:
brew install python python3 --version
- Install required packages:
pip install -r requirements.txt
Run the key generator:
python generate_key.pyStart the GUI:
python war.py --guiTo play the classic text-based version in your terminal:
python war.pyDecrypt and view results:
python decrypt_results.pyDouble-click run.bat to:
- Generate the key (if missing)
- Choose to play the GUI or Console version from a menu
All .py files use os and sys for path handling and are compatible with Windows, macOS, and Linux. No platform-specific code is used.
- Make sure
win-results.keyandwin-results.jsonare in the same directory as the scripts. - For Linux/macOS, use the same commands in your terminal.
Made with ❤️ by the BubblesTheDev!