Coconut-Bible-G&T is a variation of a Rock-Paper-Scissors game build with HTML, CSS & JavaScript inspired by the TV series, Fleabag.
You can play the game here.
The rules are pretty simple. The player (Fleabag) is playing against the machine (Priest). Whoever gets to 5 points, wins. 🏆
The outcome of each round is determined by 3 simple rules:
- Bible wins over Coconut (Bible covers Coconut)
- G&T wins over Bible (G&T spills all over Bible)
- Coconut wins over G&T (Coconut smashes G&T can)
Better understanding of the JavaScript execution context and CSS stacking context
➡️ how to recognize logical blocks of code and enclose them in functions
➡️ how to pass a button value to a function using this keyword
➡️ how to use DOM manipulation to trigger element transformation
➡️ how to use pseudo elements to "manipulate" stacking context
➡️ how to utilise the power of relative length units (em, vw / vh) and media queries to ensure responsivness on various devices