Responsive Hangman Game App

Solution retrospective
I am proud of the logic to hide the letters. Being a self-taught developer, it was particularly challenging to fix some of the bugs I encountered when implementing the logic to hide random letters. I am happy that I manage to fix them.
What challenges did you encounter, and how did you overcome them?Logic to hide random letters.
What specific areas of your project would you like help with?I will like a code review, if possible. I intend to refactor the code overtime.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Risclover
Hey Victor! Some things you might want to consider figuring out when you refactor in the future that I noticed while testing your solution:
- You're lacking spaces in between words. As you have it now, there are no spaces, which smooshes the words together, making it look like one word. For example,
Orange is the new black
looks likeorangeis thenew black
ororangeisthe newblack
, depending on the screen size. - As we discussed over in my solution, you're not supposed to reveal the letters like you're doing in a traditional game of Hangman. I think you're making it way too easy on the player by doing that, and you're taking away half of their game lol 😊
- When the player tries to guess an incorrect letter, although the 'lives' meter goes down like it should, the letter doesn't get disabled to indicate that the user has already guessed that letter. The only time the letters get disabled are when the player guesses a letter correctly, so the player is able to guess a letter incorrectly multiple times, which shouldn't be the case.
- It looks like your lives meter might contain an extra life, I think? The meter goes down to 0 and then on the NEXT guess, the game ends. It should end right when the meter hits 0, not the turn after.
Overall, nothing too big. Good job.
Marked as helpful - You're lacking spaces in between words. As you have it now, there are no spaces, which smooshes the words together, making it look like one word. For example,
- @tsotneforester
You are smart guy! at first I also intended to export
how to play
,pick a category
and etc... as ** .svg** files, but then I could somehow (AI helped a lot) manage to create componenet that renders that texts correctly. here is css code:h1 { line-height: 120%; text-align: center; background: linear-gradient(180deg, #67b6ff 16.42%, #ffffff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; display: block; position: relative; &:before, &:after { content: 'Pause'; position: absolute; top: 0; left: 0; width: 100%; line-height: 120%; text-align: center; background: linear-gradient(180deg, #67b6ff 16.42%, #ffffff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } &:before { z-index: 1; -webkit-text-stroke: 10px #2c3342; } &:after { z-index: 2; } }
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord