////////////////////////////////////////
// Programming project code
// UniBw M, 2022, 2023, 2024
// www.unibw.de/inf2
// (c) Mark Minas (mark.minas@unibw.de)
////////////////////////////////////////

package pp.battleship.model;

/**
 * An interface for implementing the Visitor pattern for different types of elements in the Battleship model.
 *
 * @param <T> the type of result returned by the visit methods
 */
public interface Visitor<T> {
    /**
     * Visits a Shot element.
     *
     * @param shot the Shot element to visit
     * @return the result of visiting the Shot element
     */
    T visit(Shot shot);

    /**
     * Visits a Battleship element.
     *
     * @param ship the Battleship element to visit
     * @return the result of visiting the Battleship element
     */
    T visit(Battleship ship);
}
