Skip to content
Simple JS connect-four game
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
img Added favicon Oct 14, 2015 Updated Oct 19, 2015
check_win.js Simplified diagonal win check Oct 19, 2015
data.js Split up js functions Oct 19, 2015
index.html Made changes to some id names Oct 19, 2015
setup_game.js Split up js functions Oct 19, 2015
style.css Made changes to some id names Oct 19, 2015

Connect Four

Built With

• JS


A simple connect four game built with HTML, CSS, and JS. The user has options of playing with another player, or with a basic AI that makes random moves.


This game was built to practice HTML, CSS, and JS, and to improve problem solving skills and consistent logical thinking.


Demo of this game can be found here.

Unsolved Problems

There are some isolated use cases that cause:

• A win to be not detected when there are five consecutively same colored chips, instead of four.

Future Improvements

I want to:

• Make the AI smarter so that it actively blocks the player from winning.
• Keep track and display each player's wins.
• Add the ability to store a game to play later, using Firebase, local storage, or similar.
• Add the ability to play live with another person remotely, using Firebase or similar.

You can’t perform that action at this time.