Giter Site home page Giter Site logo

number-guessing's Introduction

Number Guessing Game

Description

Create a one player number guessing game

Explorer Mode

  • Clone this repo!
  • Change the remote!
  • Edit the main.js.
  • You are creating a guessing game. Some elements of the game are already written, but poorly!
  • When the player initiates a game, the computer should pick a random (whole) number between 0 - 100.
  • As the player guesses, the computer should let the player know if they should guess higher or lower.
  • When the player guesses the number, the computer should congratulate them and ask if they want to play again.
  • If the player chooses to play again, the game should reset, and the computer should choose a new number.
  • Create a stylesheet to make your game pretty (but only after your game works)!
Notes

There are some notes for you in the main.js file

What to Submit

A link to a repo containing at least:

  • index.html
  • main.js
  • style.css

Adventurer Mode

  • Allow the user to select a range of numbers between which to guess.
  • Have the computer keep track of how many turns it took the player to guess the number. Tell the player how many turns it took them to guess after they have won.

Epic Mode

  • Minimize the actual logic in any of your functions (including the guessingGame) by breaking your code into smaller chunks. Try to make as much of the code as modular as possible - this means finding patterns and re-using code whenever possible.
  • Try to refactor your code so that your functions have return values, and no side effects. You won't be able to completely remove side effects, but see how close you can get.
  • Write a blog about about why some variables are declared outside the guessingGame function, and why that could be a useful or harmful thing
Notes

Sometimes, if you just add a(nother) parameter to a function, you can use it for two different, but similar situations.

number-guessing's People

Contributors

nicerhugs avatar

Watchers

James Cloos avatar  avatar

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.