You can find the wikipedia page explaining its premise and rules here.
Note: Zooming is not implemented very well.
In order for these to take effect, focus/click on the canvas, then press R to restart.