////////////////////////////////////////
// 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 representing any item on a ship map.
 * It extends the IntPosition interface to provide position information.
 */
public interface Item {

    /**
     * Accepts a visitor to perform operations on the item.
     *
     * @param visitor the visitor performing operations on the item
     * @param <T>     the type of result returned by the visitor
     * @return the result of the visitor's operation on the item
     */
    <T> T accept(Visitor<T> visitor);

    /**
     * Accepts a visitor to perform operations on the item without returning a result.
     *
     * @param visitor the visitor performing operations on the item
     */
    void accept(VoidVisitor visitor);
}
