a simple game in javascript