Welcome to the Connect Four game! This project allows you to play the classic Connect Four game against another human player on the same computer.
To run this project, you need to have Node.js installed on your system.
-
Clone this repository to your local machine:
git clone <repository-url>
-
Navigate to the project directory:
cd connect-four-game
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:3000
to view the game.
- When the game starts, you'll see the game board with empty slots.
- Players take turns to drop their colored discs into the columns of the board.
- The first player to connect four of their colored discs in a row wins the game.
- If the board fills up before a player achieves four in a row, the game is a draw.
Connect Four is played on a vertical grid with 7 columns and 6 rows. Players alternate turns, dropping one of their colored discs into an empty column. The discs fall straight down, occupying the lowest available space within the column.
To win, you must be the first player to connect four of your colored discs in a row, either horizontally, vertically, or diagonally.
The game interface is responsive, adapting to different screen sizes for optimal viewing and interaction. Whether you're playing on a desktop or a mobile device, you'll have a smooth gaming experience.
- Game Board: Click on any empty slot in the column to drop your disc.
- Reset Button: Resets the game to its initial state, allowing you to start a new game.
- Game Rules Button: Provides a brief overview of the game rules.
- Disc Animation: Discs animate into their position when a move is made.
- Play Against Computer: Coming soon!
Feel free to connect with me on the following platforms to discuss, ask questions, or just say hello:
This project was created by ABAYIZERA Samuel. It utilizes React.js and Vite for development. Connect Four game logic is implemented in JavaScript.