public bool isFlammable(ISquareTypes Square) { if (Square.GetType().ToString() == "Chicago_Fire.FlammableSquare") { return true; } else { return false; } }
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!"); } }