Connect Four Game

[_|_] Table of Contents

Table of Contents

(o´▽`o)ノ Introduction

Connect Four is a classic connecting game for two players. In this version the first player is red and the second player is yellow, taking turns dropping a colored disc from above onto a grid. The goal is to be the first to form a horizontal, vertical or diagonal line of four discs of your color.

This web-based Connect Four game is implemented using HTML, CSS and JavaScript. It features an interactive and adaptive game board with an easy to use interface.

( ノ-_-)ノ゙_□ VS □_ヾ(^-^ヽ) How to Play and WIN

  • Open the link.
  • The first player will be red and the second player will be yellow.
    P.S.: If you play alone, you can be whoever you want as long as it is between yellow and red. Sorry there are no other options. Life is hard sometimes.
  • Click on any column of the grid to drop a disc of your color.
  • The game will alternate between Red and Yellow player.
  • The first player to connect four discs of their color in a row, column, or diagonal wins. What if no one wins? It's a tie.

If we have a winner, in addition to seeing on screen who has won, you will also hear the winner.

Do yo wanna play again? You have a button:


(^◡^)っ👆

Possibilities

Different scenarios

ROW


row

COLUMN


column

DIAGONALLY


diagonally

TIE


tie

__φ(。。) Learning Highlights

One interesting part of this code is how it dynamically creates the game board using JavaScript. It uses a two-dimensional array to represent the grid and adds event listeners to each grid cell to handle player moves. The game logic for checking winning conditions, such as horizontal, vertical, and diagonal connections, is also a significant part of the codebase.

(ˆ⌣ˆ)♡ What you need to make it yours

It is made with HTML, Css and Javascript so you don't need anything special. You can play directly by clicking on the link, you can fork the project or you can download the entire game. It is up to you.

(ノ◕ヮ◕)ノ*:・゚✧ Who is Raquel

I am Raquel, I consider myself a person with a great sense of humor, always eager to learn, a lover of challenges and this combination is what led me to study web development.

If you want to know more about me or if you have a fun project and you need help we could work together, you can find me here

▲ UP ▲