Skip to content

Latest commit

 

History

History
30 lines (17 loc) · 1.11 KB

domino.md

File metadata and controls

30 lines (17 loc) · 1.11 KB

Domino

This is a timed 50 minute exercise.

Task

Write the HTML, CSS and JavaScript needed to display a domino tile and populate it with random values for its top and bottom faces when a button is clicked. Additionally, provide 2 buttons that rotate the tile.

UI Mockup

Component requirements

  1. Dominos can have 0 to 6 (inclusive) dots on a face.
  2. Clicking the "Generate" button will populate the domino with a random number of dots on each of the 2 faces.
  3. Clicking the "Rotate Left" or "Rotate Right" buttons will rotate the domino left or right. (Hint: You can use CSS transforms to achieve the rotation.)
  4. [Optional] Make it pretty.

Code requirements

  1. You can use base JavaScript libraries such as jQuery, underscore.js, Backbone.js, etc.
  2. Submit code in a JSFiddle so that it can be easily viewed and analyzed.

Evaluation

In addition to the correctness of your solution, the style and architecture of your code will also be evaluated.