Mouse game in JavaScript