This is a timed 50 minute exercise.
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.
- Dominos can have 0 to 6 (inclusive) dots on a face.
- Clicking the "Generate" button will populate the domino with a random number of dots on each of the 2 faces.
- 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.)
- [Optional] Make it pretty.
- You can use base JavaScript libraries such as jQuery, underscore.js, Backbone.js, etc.
- Submit code in a JSFiddle so that it can be easily viewed and analyzed.
In addition to the correctness of your solution, the style and architecture of your code will also be evaluated.