{"id":21470915,"url":"https://github.com/saadarazzaq/mastermind-game","last_synced_at":"2025-03-17T06:45:08.079Z","repository":{"id":244705201,"uuid":"816016682","full_name":"SaadARazzaq/Mastermind-Game","owner":"SaadARazzaq","description":"A CLI-based python game where players guess a secret sequence of colors, supporting multiple modes. 🔢","archived":false,"fork":false,"pushed_at":"2024-06-16T21:06:02.000Z","size":217,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T16:14:21.104Z","etag":null,"topics":["cli","documentation","mastermind-board-game","multiplayer","python","strategy-game"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=wsYPsrzCKiA","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SaadARazzaq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-16T20:36:04.000Z","updated_at":"2024-06-16T21:08:05.000Z","dependencies_parsed_at":"2024-06-16T21:40:14.170Z","dependency_job_id":"3de384cf-8049-481f-9220-2bda6f5093ea","html_url":"https://github.com/SaadARazzaq/Mastermind-Game","commit_stats":null,"previous_names":["saadarazzaq/mastermind-game"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaadARazzaq%2FMastermind-Game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaadARazzaq%2FMastermind-Game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaadARazzaq%2FMastermind-Game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaadARazzaq%2FMastermind-Game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SaadARazzaq","download_url":"https://codeload.github.com/SaadARazzaq/Mastermind-Game/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243988956,"owners_count":20379649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","documentation","mastermind-board-game","multiplayer","python","strategy-game"],"created_at":"2024-11-23T09:29:43.954Z","updated_at":"2025-03-17T06:45:08.059Z","avatar_url":"https://github.com/SaadARazzaq.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MasterMind Game\n\n## Overview\nMasterMind is a classic code-breaking game where players try to guess a secret code consisting of a sequence of colors. This Python-based version of MasterMind is a Command-Line Interface (CLI) game that supports different game modes, including Human vs Human, Human vs CPU, and a Campaign mode.\n\n## Features\n- CLI-based gameplay\n- Multiple game modes: Human vs Human, Human vs CPU, and Campaign\n- Random code generation for CPU\n- Predefined codes for Campaign mode\n- Feedback on guesses, indicating correct positions and incorrect positions\n\n## Requirements\n- Python 3.x\n\n## Installation\n1. Ensure you have Python 3.x installed on your system.\n2. Download or clone the game script to your local machine.\n\n## How to Play\n1. Open your terminal or command prompt.\n2. Navigate to the directory where the script is located.\n3. Run the script using Python:\n    ```sh\n    python mastermind.py\n    ```\n\n## Game Modes\n### 1. Human vs Human\n- Player 1 creates a secret code.\n- Player 2 tries to guess the code within a limited number of attempts (10 tries).\n\n### 2. Human vs CPU\n- The CPU generates a random secret code.\n- The human player tries to guess the code within 10 attempts.\n\n### 3. Campaign\n- The player goes through multiple levels with predefined secret codes.\n- Each level presents a new code to guess within 10 attempts.\n\n## Scoring\n- After each guess, feedback is provided indicating the number of correct positions and incorrect positions.\n- A correct position means the guessed color is in the correct place.\n- An incorrect position means the guessed color is correct but in the wrong place.\n\n## Game Instructions\n### Starting the Game\n- When the game starts, you will be prompted to choose a game mode.\n- Enter the number corresponding to your desired game mode (1-3).\n\n### Making a Guess\n- For each attempt, enter your guess as space-separated color codes (e.g., `R G B Y`).\n- Valid color codes are:\n  - R: Red\n  - G: Green\n  - B: Blue\n  - Y: Yellow\n  - W: White\n  - O: Orange\n\n### Ending the Game\n- The game ends when the code is correctly guessed or the number of attempts is exhausted.\n- In Campaign mode, the game progresses to the next level upon correctly guessing the code.\n\n## Game Outputs\n\n![image](https://github.com/SaadARazzaq/Mastermind-Game/assets/123338307/87d0f22c-3ddf-491f-8c96-92887a0f36ba)\n![image](https://github.com/SaadARazzaq/Mastermind-Game/assets/123338307/f7896817-7a08-4953-b206-3135e529d34f)\n![image](https://github.com/SaadARazzaq/Mastermind-Game/assets/123338307/d6cc1116-4808-488e-80e4-982919daab49)\n\n# Test Cases:\n\n![image](https://github.com/SaadARazzaq/Mastermind-Game/assets/123338307/fb1c4f9d-f4c7-4483-a10c-d9c844786bb2)\n\n## Developer Notes\n- The game uses the `random` library for generating random codes.\n- The `COLORS` list defines the possible colors in the code.\n- The `TRIES` constant sets the maximum number of attempts (default is 10).\n- The `CODE_LENGTH` constant sets the length of the secret code (default is 4).\n\n## Future Enhancements\n- Add more levels to the Campaign mode.\n- Implement additional difficulty settings.\n- Improve user feedback and error handling.\n\n---\n\nEnjoy playing MasterMind! If you encounter any issues or have suggestions for improvements, feel free to contribute or open an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaadarazzaq%2Fmastermind-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaadarazzaq%2Fmastermind-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaadarazzaq%2Fmastermind-game/lists"}