This Connect 4 game is a simple implementation using HTML, CSS, and JavaScript.
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.
- Classic Connect 4 gameplay.
- Visual indication of current player's turn.
- Win detection for horizontal, vertical, and diagonal connections.
- Open the game in a web browser.
- The game starts with Player 1 (usually represented by red discs) being prompted to make a move.
- Click on the column where you want to drop your disc.
- The disc will fall to the lowest available slot in the chosen column.
- Alternate turns between Player 1 and Player 2 (usually represented by yellow discs).
- 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.
- Click the reset button to start a new game.
- Clone the repository or download the ZIP file.
- Extract the files (if downloaded as ZIP).
- Open the
index.html
file in a web browser.
- 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.