First modifications at the beginning
now player moves
player stay within limits
Added random speed to enemies
enemies now have independent speeds on each iteration
Added collision detection as a function in engine.js
Everything works as required, except falling to the water
Now player re-inits if go into the water
Cleaned some comments
Added a game over and ready state
Added a three-state game variable (GAMEOVER, READY, RUNNING)
Final stable standard version. Added some comments.