Giter Site home page Giter Site logo

ashtonguesswho's Introduction

jQuery Guess Who

You will be creating a pick-the-person game with HTML, CSS, and jQuery!

Update Your GitHub Profile Picture

Before you get started writing code, please update your GitHub profile to include a picture of yourself. Feel free to add you and your group members to the data.js file -- follow the format!

Display Profile Pictures

On document load, append divs for each person in the data.js file to the DOM with jQuery (not hardcoded), each containing an image from each GitHub profile (see the provided data.js file). As an example, the below HTML would produce Chris's GitHub profile picture where christopher-black is Chris's GitHub username and 250 is the size of the picture requested.

<img src="https://github.com/christopher-black.png?size=250" alt="Profile image of Chris">

Start the Game

Prompt the player to pick one of the people by displaying a randomly selected name.

Here is a handy function to generate a random number given a minimum and maximum.

function randomNumber(min, max){
    return Math.floor(Math.random() * (1 + max - min) + min);
}

Game Logic

  • If the player clicks on the correct person
    • give them a success message.
    • Prompt the player to pick another person randomly and let them keep playing.
  • If they pick the wrong person
    • give them an error message.
    • allow them to try again.

example.gif

Stretch Goals

  • When the player clicks on the correct person, add a visual cue that indicates that they picked the correct person. Then change it back after 2 seconds and resume the game. You'll need to use the built in setTimeout() function for the timing. This function waits a given amount of time and then calls a function you specify.
  • Add some jQuery effects, animations and styling to your game! There are quite a few built in. See the Docs!
  • Randomize the array of images before displaying them on the page to make the game more challenging.

ashtonguesswho's People

Contributors

ashtongasser avatar

Watchers

 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.