Skip to content

Connect 4 is a two-player connection game in which the players take turns dropping colored discs from the top into a vertically suspended grid.

Notifications You must be signed in to change notification settings

x-darkvanilla-x/Connect-4-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Connect 4 Game

Screenshot 2024-04-06 180245

This Connect 4 game is a simple implementation using HTML, CSS, and JavaScript.

Introduction

Connect 4 is a two-player connection game in which the players take turns dropping colored discs from the top into a 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.

This implementation of Connect 4 provides a simple and enjoyable gaming experience within the web browser.

Features

  • Classic Connect 4 gameplay.
  • Visual indication of current player's turn.
  • Win detection for horizontal, vertical, and diagonal connections.

How to Play

  1. Open the game in a web browser.
  2. The game starts with Player 1 (usually represented by red discs) being prompted to make a move.
  3. Click on the column where you want to drop your disc.
  4. The disc will fall to the lowest available slot in the chosen column.
  5. Alternate turns between Player 1 and Player 2 (usually represented by yellow discs).
  6. The game continues until one player achieves four discs in a row horizontally, vertically, or diagonally, or until the grid is filled without a winner.
  7. Click the reset button to start a new game.

Installation

  1. Clone the repository or download the ZIP file.
  2. Extract the files (if downloaded as ZIP).
  3. Open the index.html file in a web browser.

Usage

  • You can directly play the game by opening the index.html file in a web browser.
  • Customize the game further by modifying the HTML, CSS, and JavaScript files according to your requirements.

About

Connect 4 is a two-player connection game in which the players take turns dropping colored discs from the top into a vertically suspended grid.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published