Nine Men's Morris

This is a strategy game. It consists of three phases:

In the first phase, the players take turns in placing pieces on empty corners on the board. If a mill (3 pieces in a straight line) gets formed, the active player may remove one of his opponent's pieces.

When each player has put all of his pieces on the board, the second phase starts. Here, each player moves pieces on empty adjacent points instead of placing them. That means, the player picks a piece up (help message: White/Black player, click a white/black piece to move it!) and places it on a corner that is connected to the corner where the piece has been before (help message: White/Black player, place your piece on an adjacent corner! ) The same rules for mills apply.

When one player has only 3 pieces left on the board, the third phase starts. He then may jump around with his pieces, e.g. move them to any vacant point on the board.

When one player has fewer than 3 pieces remaining, he loses.

Keybinds: 's' switches between single and two player mode, 'r' resets the game, 'd' shows debugging messages