A classic Connect Four board game with multiple playing modes, implemented using JavaScript.
Online Version: {transient} Static Version: {persistence}
- Interactive Gameplay: Play against the computer, a friend in two-player mode, or watch AI vs AI.
- AI Opponent: The AI uses Minimax with Alpha-Beta pruning for challenging gameplay.
- Multiplayer Mode: Play online with friends.
- Dumb AI: A simpler AI logic for less challenging gameplay.
- Chat Feature: Allows two online players to communicate during the game with some delay due to the HTTP protocol.
- Backend: Implemented using Node.js HTTP module instead of Express.js, offering a deeper understanding of backend challenges and reasons for using frameworks.
- Real-Time Gameplay: Although WebSockets could have been used for real-time responses, the project uses simple HTTP to handle multiple requests for updates, providing insight into the complexity of HTTP protocol.
- Node.js
- Clone the repository:
git clone https://github.com/peonix0/connect4.git
- Navigate to the project directory:
cd connect4
- Install the dependencies:
npm install
- Start the server:
node app.js
- Open your browser and go to
http://localhost:3000
.
public/
: Contains static files (HTML, CSS, JavaScript).utils/
: Includes utility functions for backend.app.js
: Main server file and all routing.
The Connect4 game interface showcasing the board, multiplayer mode, and chat feature.