Sea battle game written in JavaScript / Jquery