Giter Club home page Giter Club logo

number-guessing-game's Introduction

number-guessing-game

Play Now

Link to Hosted Site

https://wendyvosu.github.io/number-guessing-game/

Installation Instructions

-There is no installation necessary to play the game. The game can be accessed through the "Link to Hosted Site".

How to Play

Objective

The player wins if they are able to guess the number correctly.

  1. The player will choose between difficulty modes: easy, medium, and impossible. The ranges of the difficulty modes are as follows:
  • Easy: 0 - 100
  • Medium: 0 - 200
  • Impossible: 0 - 300
  1. The player will input an integer guess. The input number will be compared to the randomly chosen number and return whether the number is higher, lower, or the correct number.
  2. If the player guesses incorrectly, the player loses a turn. Each time the player loses a turn, genie will take a turn guessing a number. Both the player and genie is allowed 10 turns each. Once the player is out of turns and is unable to guess the correct number, they lose to genie.

Creation of the Game

Wireframe

Number Guessing Game Wireframe

Explanations of Specific Technologies

Built with HTML, CSS, JavaScript, and the DOM on VS Code.

Approach Taken

  • First, I wrote out the game in pseudocode to detail how I wanted the game to function.
  • Then, I decided to build the scripts necessary for the game to function. I built the scripts into each HTML page that required it.
  • Finally, I added styles to the index and other HTML files.

Technical Details

The script of the game uses four separate functions: checking the user's guess, checking the computer's guess, ending the game, and resetting the game.

Technical Challenges

Preventing page refreshing once the functions have passed.

Unsolved Problems

Minor styling issues.

Future Improvements

  • Modify the script so that the user is restricted from guessing numbers which fall out of the possible range of the number.
  • Modify the script so that the computer is unable to make the same guess multiple times by using an array.
  • Additional styling adjustments.

number-guessing-game's People

Contributors

wendyvosu avatar

Watchers

 avatar

Forkers

meeks71

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.