added battleship logics