Skip to content

amanb014/connect4

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
css
 
 
js
 
 
 
 
 
 

connect4

This is a prototype of the popular classic game Connect 4.

The code is written in HTML, CSS, and Javascript.

How to play: The game involves two players, and each player gets one (1) move per turn. In each turn, a player must choose a column to drop their piece. The pieces fall down (because of pseudo-gravity) and go to the bottom most space available. Player 1 is red, Player 2 is black. Each player's goal is to create a sequence of four (4) pieces horizontally, vertically, or diagonally. There are three outcomes of the game: player 1 wins, player 2 wins, draw.

Controls of the Game:

  1. Players can click on the column to drop their piece (or touch)
  2. Players can use the arrow keys to move through columns and space to drop on their physical keyboard (given they have one)
  3. Players can use A and D to move through columns and space to drop on their physical keyboard.
  4. Players can enable on-screen left, right, and drop keys and press the buttons.

Each player gets to enter their name for pseudo-points assigned to their name. Currently, no scores are stored anywhere to prove your victories.

Thank you for reading, enjoy!

Live demo can be found on amanbhimani.com

TO-DO LIST:

  1. Players can change names
  2. Keyboard controls (arrows, AD, Space, down)

About

Connect 4 version in HTML+CSS+Javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published