{"id":25809891,"url":"https://github.com/janeberry/hangman","last_synced_at":"2026-05-26T16:08:14.422Z","repository":{"id":249702687,"uuid":"806373172","full_name":"janeberry/Hangman","owner":"janeberry","description":"Classic Hangman Game","archived":false,"fork":false,"pushed_at":"2024-08-11T01:07:51.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T07:07:38.819Z","etag":null,"topics":["data-structures","linked-list","lists"],"latest_commit_sha":null,"homepage":"","language":"Java","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/janeberry.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-05-27T04:34:06.000Z","updated_at":"2024-08-15T23:06:16.000Z","dependencies_parsed_at":"2025-02-27T23:59:24.546Z","dependency_job_id":null,"html_url":"https://github.com/janeberry/Hangman","commit_stats":null,"previous_names":["janeberry/hangman"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/janeberry/Hangman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janeberry%2FHangman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janeberry%2FHangman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janeberry%2FHangman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janeberry%2FHangman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janeberry","download_url":"https://codeload.github.com/janeberry/Hangman/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janeberry%2FHangman/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33528188,"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":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["data-structures","linked-list","lists"],"created_at":"2025-02-27T23:25:09.163Z","updated_at":"2026-05-26T16:08:14.417Z","avatar_url":"https://github.com/janeberry.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hangman Game\nThis is a classic Hangman game implemented in Java. \u003cbr\u003e\nThe game selects a random word from a predefined list, and the player must guess the word one letter at a time. \u003cbr\u003e\nThe player has a limited number of attempts to guess the word correctly before losing the game.\n\n\u003ch2\u003e 👾How to play game\u003c/h2\u003e\nYou can play the game in Java Console.\n\u003cbr\u003e\n\n```java\nHangman game = new Hangman();\ngame.playgame();\n```\n\n\u003ch2\u003e Field Declarations\u003c/h2\u003e\n\u003cul\u003e\n  \u003cli\u003e \u003cb\u003e words\u003c/b\u003e: String [], random words list\u003c/li\u003e\n  \u003cli\u003e \u003cb\u003esecretWord\u003c/b\u003e: String, the chosen secret word\u003c/li\u003e\n  \u003cli\u003e \u003cb\u003ecorrectLetters\u003c/b\u003e: List(Character), correct guesses\u003c/li\u003e\n  \u003cli\u003e\u003cb\u003eincorrectLetters\u003c/b\u003e: List(Character), incorrect guesses\u003c/li\u003e\n  \u003cli\u003e\u003cb\u003estdin\u003c/b\u003e: Scanner, user input\u003c/li\u003e\n\u003c/ul\u003e\n\n\n\n\u003ch2\u003e Constructor \u003c/h2\u003e\n\u003cul\u003e\n  \u003cli\u003eRandomly choose a word from list of words.\u003c/li\u003e\n  \u003cli\u003eand set the word as a \u003cb\u003esecretWord\u003c/b\u003e\u003c/li\u003e\n  \u003cbr\u003e\n  \u003cli\u003eBuild a initial pattern with _ based on the secretWord (correctLetters)\u003c/li\u003e\n  \u003cli\u003einitialize incorrectLetters using an ArrayList\u003c/li\u003e\n\u003c/ul\u003e\n\n```java\nRandom rand = new Random();\nint randIndex = rand.nextInt(words.length);\nthis.secretWord = words[randIndex];\ncorrectLetters = new ArrayList\u003cCharacter\u003e();\nfor (int i=0; i\u003csecretWord.length(); i++){\n  correctLetters.add('_');\n}\nthis.incorrectLetters = new ArrayList\u003cCharacter\u003e();\n```\n\n\u003ch2\u003eMethods\u003c/h2\u003e\n\u003cul\u003e\n  \u003cli\u003eplayGame()\u003c/li\u003e\n  \u003cli\u003ehandleGuess()\u003c/li\u003e\n  \u003cli\u003egameWon()\u003c/li\u003e\n  \u003cli\u003egameLost()\u003c/li\u003e\n  \u003cli\u003egameOver()\u003c/li\u003e\n  \u003cli\u003eprintHangman()\u003c/li\u003e\n  \u003cli\u003etoString()\u003c/li\u003e\n  \u003cli\u003esetCurrentWord()\u003c/li\u003e\n  \u003cli\u003esetCorrectLetters()\u003c/li\u003e\n  \u003cli\u003esetIncorrectLetters()\u003c/li\u003e\n  \u003cli\u003esetBadGuesses()\u003c/li\u003e\n\u003c/ul\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaneberry%2Fhangman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaneberry%2Fhangman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaneberry%2Fhangman/lists"}