using System.Collections;
using UnityEngine;

[System.Serializable]
public class Road2 
{
    public RoadPoint point1;
    public RoadPoint point2;

    public Road2(RoadPoint point1, RoadPoint point2)
    {
        this.point1 = point1;
        this.point2 = point2;
    }
    
    override public string ToString()
    {
        return string.Format("Point1: {0}, Point2: {1}\n", point1, point2);
    } 

    public bool IsEqual(Road2 obj) 
    {
        return (point1.IsEqual(obj.point1) && point2.IsEqual(obj.point2)) ||
            (point1.IsEqual(obj.point2) && point2.IsEqual(obj.point1));
    }
}