Exemplo n.º 1
0
        public static Faction find( string name )
        {
            Faction faction;
            if ( factions_.TryGetValue( name.ToLower(), out faction ) )
                return faction;

            faction = new Faction( name );
            factions_[name.ToLower()] = faction;
            return faction;
        }
Exemplo n.º 2
0
 public static bool allied( Faction a, Faction b )
 {
     Faction other;
     return allianceMap_.TryGetValue( a, out other ) && other == b;
 }
Exemplo n.º 3
0
 public static Faction allyFor( Faction faction )
 {
     Faction ally;
     return allianceMap_.TryGetValue( faction, out ally ) ? ally : null;
 }
Exemplo n.º 4
0
 public static void add( string name, Faction faction )
 {
     var player = find ( name );
     if ( player != null )
         player.faction = faction;
 }