copied from battleships