public override void Draw(Graphics formGraphics) { Pipes.Graphics = formGraphics; Pipes.Big(Point.X, Point.Y, Width, Height, Color); if (PipeDirection.Any()) { switch (PipeDirection.Peek()) { case flow.PipeDirection.Medium: Pipes.Medium(Point.X, Point.Y, Width, Height, Color); NumberOfPipes++; break; case flow.PipeDirection.Up: Pipes.Up(Point.X, Point.Y, Width, Height, Color); NumberOfPipes++; break; case flow.PipeDirection.Down: Pipes.Down(Point.X, Point.Y, Width, Height, Color); NumberOfPipes++; break; case flow.PipeDirection.Left: Pipes.Left(Point.X, Point.Y, Width, Height, Color); NumberOfPipes++; break; case flow.PipeDirection.Right: Pipes.Right(Point.X, Point.Y, Width, Height, Color); NumberOfPipes++; break; default: throw new ArgumentOutOfRangeException(); } } }