Internally, the game uses JavaScript's event system where possible. In most cases, the events should be dispatched to the document object.

You can extend or overwrite these events to modify the game to your liking.