package ch.zhaw.catan;

import java.awt.Point;


/**
 * Sub Class of Structure
 * Can be saved in Siedler Board on Edges.
 *
 * @author Andrin Fassbind, Michael Ziegler
 */
public class Road extends Structure {

    //the coordinates of the start and the end Point of the road.
    private final Point start, end;

    /**
     * Constructs a road with a start and endpoint.
     *
     * @param faction The faction of the road owner
     * @param start   the coordinates of the start as a Point
     * @param end     the coordinates of the end as a Point
     */
    public Road(Config.Faction faction, Point start, Point end) {
        super(faction);
        this.start = start;
        this.end = end;
    }

    /**
     * Returns the Coordinate as a Point of the start of the road.
     *
     * @return Point of the start of the road
     */
    public Point getStart() {
        return start;
    }

    /**
     * Returns the Coordinate as a Point of the end of the road.
     *
     * @return Point of the end of the road
     */
    public Point getEnd() {
        return end;
    }
}
