Simple game written in JavaScript