Challenge:
Build a game using only Vanilla JavaScript. No frameworks and no-libraries.
- Plain JavaScript
- Html
- Plain Css
- Easy mode: guess with 3 squares.
Hard: guess with 6 squares - The player can restart the game anytime
- Once the player pick the right color all the elements change color for the same color which makes the game more interactive
- The player will learn RGB color combinations by heart and will no longer rely in color pickers
In this exercise i used:
This is a simple game, nonetheless it was very difficult to complete this exercise and make all these elements interact with another. It consists in pure logic no shortcuts.
Based on the RGB color code shown at the top of the page, the player will be able to guess which is the correct color. The player will be informed whether or not they chose the right color and will have the option to try again if their guess is incorrect. For now, the colors are hard coded. Eventually, a random color value will be given and the player will be able to guess the correct color.
If you struggle with logic within javascript this exercise it's perfect
Result:
See the source code
PLAY THE GAME