Fixed issues with ship arrangement and message dialogs.

First issue took place when user was trying to place long
(battleship, cruiser or destroyer) ships so that one of their
cells was out of the field on the left or on the top. Integer
division when calculating coordinates of resulting ship caused
the ship to have one cell less than needed which allowed the
invalid ship to be created.

Also, all message dialogs were adjusted so that they show up
in the middle of the window.
Random ship layout generation implemented.