/higher-lower-game

A basic exercise in react.

Primary LanguageJavaScript

Higher-Lower React App

image

Overview

This React app is a simple implementation of the higher/lower game. The objective of the game is to correctly guess whether the next random number will be higher or lower than the current number displayed on the screen. The game consists of 10 rounds, and if the user guesses all 10 numbers correctly, they win the game. However, if the user guesses wrong at any point, the game is over.

Game Rules

  • The app generates a series of 10 random numbers between 0 and 10.
  • It starts by showing the first randomly generated number on the screen.
  • The user is presented with two options: 'higher' and 'lower.'
  • The user must choose one of these options to make their prediction.
  • If the user's guess is correct (i.e., the next random number matches their prediction of 'higher' or 'lower'), they can proceed to the next round.
  • If the user guesses incorrectly at any point during the game, it is game over, and their score is displayed.
  • The user's objective is to guess correctly for all 10 rounds to win the game.