Update battleships

* Changed unnecessary `while` loop to a `loop` 
* Replaced any `print()` containing a single `\n` to `puts()`
* Combined consecutive assignments
* Based on versions > 1.8.7