Code Monkey home page Code Monkey logo

project-guess-who's Introduction

Project Name

The task was to create a Guess Who-game where the goal is to find the secret person among a game board of characters. The computer displays a set of options/attributes from which the player can choose. The computer will show if the attribute matches the attributes of the secret person or not and thereafter redraw the game board until the player makes a guess on the right (or wrong) person.

The problem

I have solved the project by

  1. storing a set of DOM selectors as variables that fetches HTML elements with the method getElementsByID.
  2. created som global variables to use in several functions.
  3. created a series of functions: randomly set one person as the secret person when the game is started, set an object when the player chooses one attribute in the dropdown menu, compare if the attribute matches the attributes of the secret person and depending on that select which characters to keep or remove using the filter method.
  4. set up eventListeners to fetch the player's input and invoking functions. If I had more time I would look into the intermediary and/or advanced goals aswell. I would like to know how to keep track of how many guesses the player does and create a timer that measures the time of the game.

View it live

https://blissful-golick-2b352d.netlify.app/

project-guess-who's People

Contributors

emmabartl avatar jenniedalgren 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.