fixed bug in battleship code