Пример #1
0
 public bool isFlammable(ISquareTypes Square)
 {
     if (Square.GetType().ToString() == "Chicago_Fire.FlammableSquare")
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Пример #2
0
 public FlammableSquare CastToFlammable(ISquareTypes Square)
 {
     if (this.isFlammable(Square) == true)
     {
         FlammableSquare thisSquare = Square as FlammableSquare;
         return thisSquare;
     }
     else
     {
         throw new Exception("Couldn't cast square" + Square.Name + " to Flammable Square! F**k!");
     }
 }