Gruppe22.Backend.Map.ExitToEntry C# (CSharp) Метод

ExitToEntry() публичный статический Метод

Switch Entrance and Exit in a list of exit-objects (for corresponding rooms)
public static ExitToEntry ( int ToRoom, List exits ) : List
ToRoom int Which room to switch
exits List List of exits
Результат List
        public static List<Exit> ExitToEntry(int ToRoom, List<Exit> exits)
        {
            List<Exit> result = new List<Exit>();
            foreach (Exit exit in exits)
            {
                if (exit.toRoom.Contains("om" + ToRoom.ToString() + ".xml"))
                {
                    result.Add(new Exit(exit.to, exit.toRoom, exit.from, exit.fromRoom));
                }
            }
            return result;
        }