{"id":20603469,"url":"https://github.com/danpoynor/python-phrase-hunter-game","last_synced_at":"2026-05-29T12:04:49.097Z","repository":{"id":45507665,"uuid":"513714004","full_name":"danpoynor/python-phrase-hunter-game","owner":"danpoynor","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-15T20:55:10.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-08T19:25:54.800Z","etag":null,"topics":["console-application","demo","dunder-main","game","oop","python","statistics","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/danpoynor.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}},"created_at":"2022-07-14T00:53:06.000Z","updated_at":"2022-07-15T20:49:58.000Z","dependencies_parsed_at":"2022-07-15T10:30:39.124Z","dependency_job_id":null,"html_url":"https://github.com/danpoynor/python-phrase-hunter-game","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danpoynor/python-phrase-hunter-game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danpoynor%2Fpython-phrase-hunter-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danpoynor%2Fpython-phrase-hunter-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danpoynor%2Fpython-phrase-hunter-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danpoynor%2Fpython-phrase-hunter-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danpoynor","download_url":"https://codeload.github.com/danpoynor/python-phrase-hunter-game/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danpoynor%2Fpython-phrase-hunter-game/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33650712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-application","demo","dunder-main","game","oop","python","statistics","unit-testing"],"created_at":"2024-11-16T09:17:22.643Z","updated_at":"2026-05-29T12:04:49.073Z","avatar_url":"https://github.com/danpoynor.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Phrase Hunter Game\n\nDemo console-based game app uses Python and OOP (Object-Oriented Programming) approaches to select a phrase at random, hidden from the player. A player then tries to guess the phrase by inputting individual characters.\n\nFeatures\n\n- A random phrase is automatically chosen and each letter of the phrase is displayed as an underscore character placeholders, _.\n- Each time the player guesses a letter, the program compares the letter the player has chosen with the random phrase.\n- If the user enters more than one letter, or a non-letter character, the program will display an error message.\n- If the letter is in the phrase, the phrase object is updated so that it displays the chosen letters on the screen.\n- A player continues to select letters until they guess the phrase (and wins), or make five incorrect guesses (and loses).\n- If the player completes the phrase before they run out of guesses, a winning screen appears.\n- If the player guesses incorrectly five times, a losing screen appears.\n\n\u003c/details\u003e\n\n---\n\n## Run the app\n\nAfter cloning the repository to your local hard-drive, `cd` into the `python-phrase-hunter-game` directory and run the following command in the terminal:\n\n```bash\npython3 app.py\n```\n\nNOTE: Python 3.10 was used to develop and test this app.\n\n---\n\n## Run Unit Tests\n\nSome basic unit tests are included to test the game play.\n\n\u003cdetails\u003e\n  \u003csummary\u003eExpand/Collapse\u003c/summary\u003e\n\nTo run the tests, after `cd`'ing into the `python-phrase-hunter-game` directory, use something like:\n\n\n```bash\npython3 -m unittest -v tests.test_game\n```\n\nand you should see some test result output like this:\n\n```bash\ntest_active_phrase_display (tests.test_game.GameTestCase) ... ok\ntest_check_guess_in_phrase (tests.test_game.GameTestCase) ... ok\ntest_game_over_loser (tests.test_game.GameTestCase) ... skipped \"TODO: When there's more time\"\ntest_game_over_winner (tests.test_game.GameTestCase) ... skipped \"TODO: When there's more time\"\ntest_get_random_phrase_returns_a_string (tests.test_game.GameTestCase) ... ok\ntest_is_valid_guess (tests.test_game.GameTestCase) ... ok\ntest_scoreboard_stats (tests.test_game.GameTestCase) ... skipped \"TODO: When there's more time, test this\"\ntest_should_include_at_least_5_phrases (tests.test_game.GameTestCase) ... ok\ntest_welcome_message (tests.test_game.GameTestCase) ... ok\n\n----------------------------------------------------------------------\nRan 9 tests in 0.002s\n\nOK (skipped=3)\n```\n\nNote: If you run the command without the -v flag, such as:\n\n```bash\npython3 -m unittest tests.test_game\n```\n\nYou should see test result output like this:\n\n```bash\n..ss..s..\n----------------------------------------------------------------------\nRan 9 tests in 0.002s\n\nOK (skipped=3)\n```\n\nThe `..ss..s..` indicates nine tests found but three were skipped.\n\n\u003c/details\u003e\n\n---\n\n## Screen Recording Showing Some Example Game States\n\n\u003cdetails open\u003e\n\u003csummary\u003eExpand/Collapse\u003c/summary\u003e\n\nhttps://user-images.githubusercontent.com/764270/178861802-64b3c9ff-9d68-4638-aa42-efa3b9f4590b.mp4\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanpoynor%2Fpython-phrase-hunter-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanpoynor%2Fpython-phrase-hunter-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanpoynor%2Fpython-phrase-hunter-game/lists"}