A retro grid-based game in vanilla JavaScript, HTML and CSS
Connect Four (also known as Four Up, Plot Four, Find Four, Four in a Row, Four in a Line, Drop Four, and Gravitrips (in Soviet Union)) is a two-player board game in which the players first choose a color and then take turns dropping one colored disc from the top into a seven-column, six-row vertically suspended grid. The pieces fall straight down, occupying the lowest available space within the column. The objective of the game is to be the first to form a horizontal, vertical, or diagonal line of four of one’s own discs.

In this repo, I will be putting extra focus on for loops. If you want to learn how to use for loops effectively, please have a look at my code.

What inbuilt functions are we going to focus on?

  • for loops
  • addEventListener
  • setInterval
  • document.querySelector
  • arrow functions

#html #sass #javascript

Build your own CONNECT 4 in super simple JavaScript, HTML and CSS
78.55 GEEK