JavaScript HTML CSS
Latest commit 18e0cb8 Mar 17, 2016 @kenrick95 Update README.md
Permalink
Failed to load latest commit information.
.gitattributes new repo Dec 27, 2013
.gitignore update gitignore Dec 27, 2013
LICENSE Create LICENSE Apr 24, 2015
README.md Update README.md Mar 17, 2016
index.html stylize demo Nov 30, 2014
script.js fixes #2 ; edit code to fulfil JSLint (although I ignored some errors) May 24, 2015
style.css stylize demo Nov 30, 2014

README.md

c4

c4, stands for Connect Four, is a browser game in JavaScript using HTML5 features (canvas). I also incorporate an AI using Minimax algorithm and alpha-beta pruning. The evaluation function is hard-coded, and hence the AI may not be moving using the most optimal move.

Play

How to Play?

In each turn, drop a piece in one of the seven column.

Objective

Connect four of your pieces vertically, horizontally, or diagonally before the other player do so.

More info

Read Wikipedia page on Connect Four

Compatibility

Tested in latest Firefox (27), Chrome (31), and IE (11). Turn on browser console to see the "value" of the move chosen by AI.

License

This work is licensed under MIT License.