Exemple #1
0
    public bool shareLandBorder(Nation first, Nation second)
    {
        int     firstIndex     = first.getIndex();
        Country firstIndexMap  = map.GetCountry(firstIndex);
        int     secondIndex    = second.getIndex();
        Country secondIndexMap = map.GetCountry(secondIndex);

        List <Country> neighbours = map.CountryNeighboursOfMainRegion(firstIndex);

        if (neighbours.Contains(secondIndexMap))
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }