This is a HTML5 port of my Flash version of the classical logic game NIM. The game was originally part of my Flash Game Development eBook that was released on BlazingGames.com. This book is being re-written for HTML5 and is being released on https://BlazingGames.blogspot.ca for those who are interested in finding out how the game was created.
NIM is a very old game which is quite often used as a sample in the field of game theory. The goal of the game is to grab the last gem. Each round you can grab from 1 to 3 gems. The computer will then immediatly grab from 1 to 3 gems. This continues until someone takes the last game (and wins).