{"id":19989168,"url":"https://github.com/clamytoe/rps","last_synced_at":"2025-07-16T09:36:01.140Z","repository":{"id":84639626,"uuid":"145023596","full_name":"clamytoe/rps","owner":"clamytoe","description":"Rock, Paper, Scissor's game that I created during my 100 Days of Code challenge","archived":false,"fork":false,"pushed_at":"2020-01-22T16:49:04.000Z","size":681,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T21:48:07.454Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clamytoe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-08-16T18:11:38.000Z","updated_at":"2020-01-22T16:49:06.000Z","dependencies_parsed_at":"2023-07-20T20:30:27.572Z","dependency_job_id":null,"html_url":"https://github.com/clamytoe/rps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/clamytoe/rps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clamytoe%2Frps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clamytoe%2Frps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clamytoe%2Frps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clamytoe%2Frps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clamytoe","download_url":"https://codeload.github.com/clamytoe/rps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clamytoe%2Frps/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265500258,"owners_count":23777446,"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":[],"created_at":"2024-11-13T04:45:42.176Z","updated_at":"2025-07-16T09:36:01.095Z","avatar_url":"https://github.com/clamytoe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rock, Paper, Scissor's + (*rps*)\n\u003e *RPS game that I created during my 100 Days of Code challenge*\n\n![Python version][python-version]\n[![GitHub issues][issues-image]][issues-url]\n[![GitHub forks][fork-image]][fork-url]\n[![GitHub Stars][stars-image]][stars-url]\n[![License][license-image]][license-url]\n\nNOTE: This app was generated with [Cookiecutter](https://github.com/audreyr/cookiecutter) along with [@clamytoe's](https://github.com/clamytoe) [toepack](https://github.com/clamytoe/toepack) project template.\n\nThe task was to create a rock paper scissors game but beefed up with this setup:\n\n![rps15](img/rps15.jpg)\n\nI coded this to work on a Linux system, so your mileage may vary. Mac support was verified by Erik O'Shaughnessy, \nthanks Erik! I set it up to fail on any other platform though, but if you get it to work on say a Windows machine, let \nme know what your `platform.system()` shows up as and I will add it. \n\nOnce I had the initial text version working how I liked, I thought that it would be a good exercise to try and display \nthe \"rolls\" in play. Inspired by pybites' [Using Pillow to Create Nice Banners For Your Site](https://pybit.es/pillow-banner-image.html) \narticle, I decided to try and do the same.\n\nAfter extracting all of the *rolls* with [GIMP](https://www.gimp.org/) I decided to kick it up a notch and create a\nsprite sheet out of them with [TexturePacker](https://www.codeandweb.com/texturepacker):\n\n![sprite_sheet](rps/data/plays.png)\n\n\u003e Using a sprite sheet cuts down on the amount of images needed and the *json* map that's generated makes it a breeze to\nload them. \n\nStill not satisfied with all of that, I kicked it up another notch by super imposing a red X over the losing play!\n\n![loser](rps/data/lose.png)\n\nEven with all of that, it's still a little clunky with having to jump back and forth from the image to the command line,\nbut it works pretty good. I should have just used [PyGame](https://www.pygame.org/) though, but I had already spent \nenough time on this. \n\n\u003e I basically wanted to prove to myself that I could do this and I had accomplished that.\n\n\n### Initial setup\n```bash\ncd Projects\ngit clone https://github.com/clamytoe/rps.git\ncd rps\n```\n\n#### Anaconda setup\nIf you are an Anaconda user, this command will get you up to speed with the base installation.\n```bash\nconda env create\nconda activate rps\n```\n\n#### Regular Python setup\nIf you are just using normal Python, this will get you ready, but I highly recommend that you do this in a virtual environment. There are many ways to do this, the simplest using *venv*.\n```bash\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\n#### Final setup\n```bash\npip install -e .\n```\n\n## Usage\n```bash\nrps --help\nusage: rps [-h] [-r ROUNDS] [-g]\n\nRock, Paper, Scissor's +\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -r ROUNDS, --rounds ROUNDS\n                        How many rounds to play\n  -g, --gui             Display images\n```\n\nTypical run with images enabled would look like this:\n```bash\nrps --gui\n========================================================================\n                   Rock, Paper, Scissors, + 12 More!                    \n========================================================================\n\nWhat is your name? \n```\n\nAfter entering *clamytoe* as my name:\n```bash\n\n[ 1] Air\n[ 2] Devil\n[ 3] Dragon\n[ 4] Fire\n[ 5] Gun\n[ 6] Human\n[ 7] Lightning\n[ 8] Paper\n[ 9] Rock\n[10] Scissors\n[11] Snake\n[12] Sponge\n[13] Tree\n[14] Water\n[15] Wolf\n\n\nWhich play do you choose Clamytoe?\n```\n\n![round1](img/round1.png)\n\nAfter hitting *Enter* you get prompted for your choice once again. Selecting *Snake*:\n\n![round2](img/round2.png)\n\nChoosing *Dragon* for final round:\n\n![round3](img/round3.png)\n\nFinal results:\n\n![results](img/results.png)\n \n\n## Contributing\nContributions are very welcome. Tests can be run with with `pytest -v`, please ensure that all tests are passing and that you've checked your code with the following packages before submitting a pull request:\n* black\n* isort\n* pycodestyle\n* pylint\n* pytest-cov\n\nI am not adhering to them strictly, but try to clean up what's reasonable.\n\n## License\nDistributed under the terms of the [MIT](https://opensource.org/licenses/MIT) license, \"rps\" is free and open source software.\n\n## Issues\nIf you encounter any problems, please [file an issue](https://github.com/clamytoe/toepack/issues) along with a detailed description.\n\n## Changelog\n* **v0.1.0** Initial commit.\n\n[python-version]:https://img.shields.io/badge/python-3.6.6-brightgreen.svg\n[issues-image]:https://img.shields.io/github/issues/clamytoe/rps.svg\n[issues-url]:https://github.com/clamytoe/rps/issues\n[fork-image]:https://img.shields.io/github/forks/clamytoe/rps.svg\n[fork-url]:https://github.com/clamytoe/rps/network\n[stars-image]:https://img.shields.io/github/stars/clamytoe/rps.svg\n[stars-url]:https://github.com/clamytoe/rps/stargazers\n[license-image]:https://img.shields.io/github/license/clamytoe/rps.svg\n[license-url]:https://github.com/clamytoe/rps/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclamytoe%2Frps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclamytoe%2Frps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclamytoe%2Frps/lists"}