Skip to content

A classic Connect Four board game with multiple playing modes, implemented using JavaScript.

Notifications You must be signed in to change notification settings

peonix0/connect4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Connect4

A classic Connect Four board game with multiple playing modes, implemented using JavaScript.

Online Version: {transient} Static Version: {persistence}

Features

  • 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.

Technical Details

  • 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.

Getting Started

Prerequisites

  • Node.js

Installation

  1. Clone the repository:
    git clone https://github.com/peonix0/connect4.git
  2. Navigate to the project directory:
    cd connect4
  3. Install the dependencies:
    npm install

Running the Game

  1. Start the server:
    node app.js
  2. Open your browser and go to http://localhost:3000.

Project Structure

  • public/: Contains static files (HTML, CSS, JavaScript).
  • utils/: Includes utility functions for backend.
  • app.js: Main server file and all routing.

Preview

The Connect4 game interface showcasing the board, multiplayer mode, and chat feature.

The Connect4 game interface showcasing the board, multiplayer mode, and chat feature

About

A classic Connect Four board game with multiple playing modes, implemented using JavaScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published