Skip to content

A Connect4 game. Developed as a static website and a RESTful API.

Notifications You must be signed in to change notification settings

mgrinstein/connect4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Connect4

A Connect4 game in two versions:

  • Static
  • RESTful API

Built with Node.js using the Express framework, JavaScript, HTML and CSS.

Main features developed

Feature Client-Server Static
Place pieces on Connect 4 grid
Respond to click events
Detect victory conditions
Display victory conditions
Display winner
Add Player names and declare the winner

Static version

Hosted in Vercel: connect4-static.vercel.app

Client-Server version

RESTful API with NodeJS using Express.

gameplay gif

Install packages (generate package-lock.json):

  1. Access project's subdirectory:
    cd clientserver/

  2. Install packages:
    npm install

Launch server from command line & start playing

  1. Start server:
    npm start (npm will run node server.js)
    Expected output: "Express server up on port: 8080"

  2. On browser, go to https://localhost:8080

Logic behind takeTurn interaction

  1. [client - grid] EventListener on board grid (listens to "click");
  2. [client - positionClick] Client click action will POST row & column;
  3. [server - taketurn] Server responds with json containing the game’s updated state.

External links

Wikipedia - Connect Four

About

A Connect4 game. Developed as a static website and a RESTful API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published