Skip to content

danielleshwed/c4

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Connect Four game in Javascript using HTML5 features

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.6%
  • HTML 7.5%
  • CSS 1.9%