Git Product home page Git Product logo

stop-watch-react-solution1's Introduction

Golf Game

You are creating a golf game. The game starts with the click of the start button. You want to take the ball to the hole and you are timed with a timer. The ball moves with arrow keys on the keyboard.

Acceptance Criteria

  • Render a start button. The timer starts on clicking the start button. Timer counts in seconds.
  • Render a ball and a hole(destiny).
  • Before clicking the start button, the ball should not move with arrow keys.
  • After clicking the start button, ball should move by using up, down, left and right arrow keys. (each key should shift the ball by 5px in respective direction).
  • When the ball goes into the hole, timer should stop.
  • Make sure you give the components the right class names as mentioned in the details below and that you use the right state variable names
  • Carefully complete timer start and stop actions

Details:

  • The goal is to move the ball to the hole. To move the ball update top and left parameters in css with absolute positioning.
  • Track the seconds using state variable time.
  • Track the coordinate of the ball using state variable x and y
  • Coordinates of the ball at starting should be 0, 0
  • Coordinates of the hole should be (250px, 250px)
  • class name of the ball - > ball
  • class name of the hole -> hole
  • class name of the display timer should be -> heading- timer
  • class name of the start button -> start

stop-watch-react-solution1's People

Contributors

shumsd143 avatar

Watchers

James Cloos avatar Gaurav Kapatia 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.