Coder Social home page Coder Social logo

click-the-black-box's Introduction

Click-the-black-Box

https://trello.com/b/n6yO0XID/project-1

Dont forget to add wire fram img.

The approach to this game was to first break all clear elements into smaller pieces. My game board had four buttons and i knew each button was going to need an event listener so i created them using a for loop, giving each a unique id for styling later on and appended them into my game board, munipulating the dom and creating the physical buttons. I then knew i needed to select one of these boxes at random to create the games main element. i did this by utilizing the math.random function and having a new button picked everytime a button is selected. I knew i would need a score board that could have up to five players and did this by creating a ordered list and appending each score value into the corresponding list item when the counter reached zero, this also allowed me to reset my score variable, making it possible for the scoring of each player to start, predictably at zero. to play this game is simple! just follow this link and enjoy! I used recursion twice in this game. once to recall the gamefucntion, that allows my game to be played continuosly and with turns and also again in timer so whenever the timer reaches zero, it not only sends an alert to the next player but also starts the countdown again.

https://nleibow.github.io/Click-the-black-Box/

click-the-black-box's People

Contributors

nleibow avatar

Watchers

James Cloos 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.