Esempio n. 1
0
 /// <summary>
 /// Gets the coordinate of the specified Place.
 /// NOTE: DOES NOT WORK WITH DEFAULT PLACE
 /// </summary>
 /// <param name="p">Place that needs locating</param>
 /// <returns>Returns a Tuple of ints containing the coordinates, or (-1, -1) if the place could not be found. </returns>
 public Tuple<int, int> getCoordsOf(Place p)
 {
     foreach(Place place in placeMap)
         if (place.GetType() == p.GetType())
             return place.location;
        return new Tuple<int, int>(-1, -1);
 }
Esempio n. 2
0
 /// <summary>
 /// Gets the coordinate of the specified Place.
 /// NOTE: DOES NOT WORK WITH DEFAULT PLACE
 /// </summary>
 /// <param name="p">Place that needs locating</param>
 /// <returns>Returns a Tuple of ints containing the coordinates, or (-1, -1) if the place could not be found. </returns>
 public Tuple <int, int> getCoordsOf(Place p)
 {
     foreach (Place place in placeMap)
     {
         if (place.GetType() == p.GetType())
         {
             return(place.location);
         }
     }
     return(new Tuple <int, int>(-1, -1));
 }