a miniature game in Javascript