Canvas Tutorial: Halma Board Game
Here's a sample demo of a game using HTML Canvas.
This is a one-person version of the game halma.
The goal is to move all the pieces to the opposite corner, with minimum steps.
Click a circle to select, then click a empty square to move to.
There are 2 ways to move:
- Move a piece to adjacent square. (diagonal is ok)
- jump a piece over another to land on a empty square. (diagonal is ok) You can continue to jump.
The code is at
The code is written by Mark Pilgrim. Licensed under http://creativecommons.org/licenses/by/3.0/.
Ask me question on patreon