A simple game in Javascript