Frogger like game in JavaScript