Skip to content

Rock-Paper-Scissor game inspired by one of the best TV shows ever made, Fleabag. 👄 🦊

Notifications You must be signed in to change notification settings

lara-isak/coconut-bible-ginandtonic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coconut-bible-g&t

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.

🎲 Game rules

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:

  1. Bible wins over Coconut (Bible covers Coconut)
  2. G&T wins over Bible (G&T spills all over Bible)
  3. Coconut wins over G&T (Coconut smashes G&T can)

👍 Motivation behind the project

Better understanding of the JavaScript execution context and CSS stacking context

🌱 What I learned

➡️ 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