コード例 #1
0
    public int CompareTo(Node node)
    {
        int compare = Fcost.CompareTo(node.Fcost);

        if (compare == 0)
        {
            compare = Hcost.CompareTo(node.Hcost);
        }
        return(-compare);
    }
コード例 #2
0
        public int CompareTo(Tile other)
        {
            int compare = Fcost.CompareTo(other.Fcost);

            if (compare == 0)
            {
                compare = Hcost.CompareTo(other.Hcost);
            }
            return(-compare);
        }
コード例 #3
0
    public int CompareTo(Vector2IHeapable NodeToCompare)
    {
        var compare = Fcost.CompareTo(NodeToCompare.Fcost);

        if (compare == 0)
        {
            compare = Hcost.CompareTo(NodeToCompare.Hcost);
        }

        return(-compare);
    }
コード例 #4
0
    public int CompareTo(StarNode NodeToCompare)
    {
        int compare = Fcost.CompareTo(NodeToCompare.Fcost);

        if (compare == 0)
        {
            compare = Hcost.CompareTo(NodeToCompare.Hcost);
        }

        return(-compare);
    }