As a part of Mobile App Development, I made a Connect 4 game in HTML5 (<canvas> and JavaScript). The win detection was challenging to implement.

I encourage you to look at the source code. One of the requirements of the project was to make sure only one object (a ConnectFour constructor function) was exposed to the page. Every variable of the game must be located in that function, to prevent cluttering the global scope.

Kinect Fore

This text should have changed.

Your browser does not support canvas tags