Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brought a sense of order and justice to server.js or game.js and commented broken image #59

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

amirsaranBIH
Copy link

game.js

  • Created two new methods: pickRandomWord and toBlankWord because the constructor was doing a lot of things and it was getting stuffed.
  • In the newGuess method there is a new way of tracking if the guess is correct or not.
  • Simplified conditional logic in the newGuess method and removed unnecessary variable declaration.
  • In the incorrectGuess and correctGuess methods I refactored and simplified the logic and made it more readable.
  • Shortened the syntax for the getState method.
  • Other small changes.

server.js

  • Refactored the code and made it more readable and less messy.
  • Simplified the default username setting.

index.html

  • Commented out <img id="profile-pig-icon" src="assets/img/profilePig.svg" /> because there is no such file. It was throwing an error in the console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant