{"id":18677949,"url":"https://github.com/kaushikshivam/hangman","last_synced_at":"2026-04-10T20:52:37.966Z","repository":{"id":39198751,"uuid":"213655237","full_name":"KaushikShivam/hangman","owner":"KaushikShivam","description":"Hangman - This is an exercise project that lets you pratice with props, defaultProps, state, and simple click events and a lot more in React.","archived":false,"fork":false,"pushed_at":"2023-01-05T09:36:32.000Z","size":5138,"stargazers_count":0,"open_issues_count":21,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T21:13:53.969Z","etag":null,"topics":["css","css-animations","css3","cssanimations","html","html5","react","react-event-handlers","react-events","reactjs"],"latest_commit_sha":null,"homepage":"https://youthful-lamport-b37d73.netlify.com/","language":"JavaScript","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/KaushikShivam.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":"2019-10-08T13:51:09.000Z","updated_at":"2020-03-10T11:24:19.000Z","dependencies_parsed_at":"2023-02-03T23:15:42.762Z","dependency_job_id":null,"html_url":"https://github.com/KaushikShivam/hangman","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaushikShivam%2Fhangman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaushikShivam%2Fhangman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaushikShivam%2Fhangman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaushikShivam%2Fhangman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KaushikShivam","download_url":"https://codeload.github.com/KaushikShivam/hangman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239525435,"owners_count":19653327,"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":["css","css-animations","css3","cssanimations","html","html5","react","react-event-handlers","react-events","reactjs"],"created_at":"2024-11-07T09:35:32.369Z","updated_at":"2025-11-07T09:30:30.813Z","avatar_url":"https://github.com/KaushikShivam.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hangman - This is an exercise project that lets you pratice with props, defaultProps, state, and simple click events and a lot more in React.\n\n[RollDice](https://youthful-lamport-b37d73.netlify.com/) is the classic hangman game built as an exercise for this [tutorial](https://www.udemy.com/course/modern-react-bootcamp/).\n\n![Hangman Screenshot](screenshot.png)\n\n## Table of content\n\n- [Description](#description)\n- [Installation](#installation)\n- [Contact](#contact)\n\n## Description\n\nThe rules of the exercise are as follows\n\n### Part One: Add A Key\n\nCurrently, the buttons don’t have a key prop. Fix this issue!\n\n### Part Two: Number of Wrong Guesses\n\nAbove the currently-guessed word, we’d like to show the number of wrong guesses, like “Number wrong: 3.” Add this.\n\n### Part Three: End Game on Loss\n\nThe game only comes (by default) with 6 gallows images and therefore should only allow six wrong guesses. However, it allows players to keep making guesses after this (and there’s a bug, in that the gallows images disappears after there are too many wrong).\n\n### Change the behavior of the game so that after six wrong guesses, it no longer shows the button area. Instead, it should show the message “You lose” and reveal the correct word.\n\nDo this without hard-coding “6” in as the number of guesses — instead, use the prop for maxGuesses.\n\n### Part Four: Alt Text\n\nAdd an alt attribute to the hangman image that explains how many guesses have been made, inc case the images don’t load. Something like “5/6” or “5 wrong guesses”\n\n### Part Five: Use a Random Word\n\nThe game right now always uses the word “apple” as the secret word. There’s a file, words.js, with a list of words and a function to return a random word. Incorporate this so that the game uses this to choose a secret word.\n\n### Part Six: Add “Restart” Button\n\nAdd a button that will restart the game. This should pick a new random word and reset the guessed list and number of wrong guesses.\n\n### Further Study\n\nImagine that other games use a sequence of buttons with letters on them. It would be nice if the buttons could be reusable components.\n\n## Installation\n\n1. Clone the project to your local directory\n\n```\ngit clone https://github.com/KaushikShivam/hangman\n```\n\n2. The project uses NPM for managing dependencies. Run npm install to install all the required dependencies\n\n```\nnpm install\n```\n\n3. Run the task runner to run the app\n\n```\nnpm run start\n```\n\n## Contact\n\nYou can contact me at:\n\n- [Portfolio](https://www.shivamkaushik.com)\n- [Email](mailto:shivamkaushikofficial@gmail.com)\n- [Linkedin](https://www.linkedin.com/in/kshivamdev/)\n- [Twitter](https://twitter.com/kShivamDev)\n- [Medium](https://medium.com/@shivamkaushikofficial)\n- [Angellist](https://angel.co/kshivamdev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaushikshivam%2Fhangman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaushikshivam%2Fhangman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaushikshivam%2Fhangman/lists"}