Psychic Game!

See if you can guess what letter of the alphabet that Professor X is thinking!

Link to x men psychic game in portfolio at https://ryanroyce.github.io/Basic-Portfolio/portfolio.html

To see the deployed version of this visit: https://ryanroyce.github.io/Psychic-Game/

The Problem

Create a Javascript program that takes user input and checks it to a random letter in the alphabet that the computer chooses.

How I solved it

Using math.random I was able to store the computers guess into a variable. Within an on key press function I was able to detect whether or not the user's guess was or was not equal to the computer's guess. The user's remaining guesses was also decremented within this function to create an end to the game when the user got the correct answer or ran out of guesses.

Upon game win or loss I also used Javascript and jQuery to increment either a win or loss and then the game resets.

Technologies Used

  • Bootstrap
  • jQuery
  • JavaScript
  • Google Fonts