{"id":19401424,"url":"https://github.com/tosox/simple-nim","last_synced_at":"2026-05-13T21:33:24.184Z","repository":{"id":115300375,"uuid":"559255624","full_name":"Tosox/Simple-Nim","owner":"Tosox","description":"A simple game of Nim written in Python","archived":false,"fork":false,"pushed_at":"2024-01-29T09:41:39.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T23:43:14.447Z","etag":null,"topics":["console","game","nim","project","python","tosox"],"latest_commit_sha":null,"homepage":"","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/Tosox.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":"2022-10-29T14:45:49.000Z","updated_at":"2024-01-29T09:29:40.000Z","dependencies_parsed_at":"2024-11-10T11:19:01.012Z","dependency_job_id":"d94b1d6a-1526-4d1b-9a9c-267cbda76365","html_url":"https://github.com/Tosox/Simple-Nim","commit_stats":null,"previous_names":["tosox/simple-nim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Tosox/Simple-Nim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tosox%2FSimple-Nim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tosox%2FSimple-Nim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tosox%2FSimple-Nim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tosox%2FSimple-Nim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tosox","download_url":"https://codeload.github.com/Tosox/Simple-Nim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tosox%2FSimple-Nim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33000968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"ssl_error","status_checked_at":"2026-05-13T13:14:51.610Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["console","game","nim","project","python","tosox"],"created_at":"2024-11-10T11:18:26.321Z","updated_at":"2026-05-13T21:33:24.158Z","avatar_url":"https://github.com/Tosox.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Nim\n\n[![](https://img.shields.io/badge/Language-Python-yellow.svg?style=flat)](https://en.wikipedia.org/wiki/Python_(programming_language)) \n[![](https://img.shields.io/github/languages/code-size/Tosox/Simple-Nim?color=blue\u0026label=Code%20size\u0026style=flat)](https://github.com/Tosox/Simple-Nim)\n[![](https://tokei.rs/b1/github/TosoxDev/Simple-Nim?color=red\u0026label=Total%20lines\u0026style=flat)](https://github.com/Tosox/Simple-Nim)\n\n**A simple game of Nim written in Python**\n\n\u003e Important Note: The AI isn't implemented yet and is instead using the logic of a random player\n\n## Usage\n\n```bash\n# Example\n\u003e python ./simple_nim.py -p1 Human -p2 Computer --rand 1\n```\n\n_Alternatively, simply execute ['play.bat'](play.bat)_\n\n| Arguments     | Description                | Accepted input                         | Notes                       |\n|---------------|----------------------------|----------------------------------------|-----------------------------|\n| -p1           | Player type for player 1   | Human, Computer, Random, AI            |                             |\n| -p2           | Player type for player 2   | Human, Computer, Random, AI            |                             |\n| --rand        | Starting player            | 0 (Random), 1 (Player 1), 2 (Player 2) | Optional - Defaults to 0    |\n\n## Rules\n\nTwo players will each take one, two or three coins at a time from a heap containing 21 coins.\nThe player who has no coins to retrieve from the heap loses.\n\n## Preview\n\n\u003cimg src=\"readme-res/preview.jpg\" width=\"650\" height=\"340\"/\u003e\n\n## More Information\n\n* https://en.wikipedia.org/wiki/Nim\n* https://www.transum.org/Software/sw/Starter_of_the_day/Starter_May29.asp\n* https://www.researchgate.net/publication/221330080_Evolving_Winning_Strategies_for_Nim-like_Games\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftosox%2Fsimple-nim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftosox%2Fsimple-nim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftosox%2Fsimple-nim/lists"}