fixed semicolon styling
added JSDoc commenting
the game resets when the player character reaches the water