MENU

Flat Inputs

CSS Dashed Shadow

November 18, 2013 Comments (0) Views: 1488 Coding

Align 4 Game

The classic game, played against an AI opponent. Applies the minimax algorithm to pick its moves. Coded as a multi-threaded app using a web worker.

Web workers require code to be executed from separate JavaScript files. The code here is the UI thread. If you want to see the web worker code, check out Align 4 Game (Web Worker).

Higher difficulty levels are computationally expensive, so the computer’s turn may take a while, especially on mobile devices.

Check out this Pen!

Tags: #, #, #, #, #, #, #, #, #, #, #, #, #

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.