lib/game.js: add working ticks and stop() function