a minimal game engine using the <pre> tag as a canvas