Example #1
0
 /// <summary>
 /// Allows a stone to interact with all other stones in the zone with the given index.
 /// </summary>
 private void _Interact(Stone Stone, ZoneIndex Index, double Time)
 {
     List<Stone> zone;
     if (this._Zones.TryGetValue(Index, out zone))
     {
         foreach (Stone other in zone)
         {
             Stone.Interact(Stone, other, Time);
         }
     }
 }
Example #2
0
 /// <summary>
 /// Removes a stone from a zone.
 /// </summary>
 private void _Remove(Stone Stone, ZoneIndex Index, List<Stone> Zone)
 {
     Zone.Remove(Stone);
     if (Zone.Count == 0) this._Zones.Remove(Index);
 }
Example #3
0
 /// <summary>
 /// Inserts a STONE into a ZONE.
 /// </summary>
 private void _Insert(Stone Stone, ZoneIndex Index)
 {
     List<Stone> zone;
     if (!this._Zones.TryGetValue(Index, out zone))
         this._Zones[Index] = zone = new List<Stone>();
     zone.Add(Stone);
 }