A simple game in javascript