using System;
using System.Drawing;

namespace VectorRace_LevelDesigner
{
    public class FieldHandler
    {
        public static void DrawType(Graphics g, int type)
        {
            if (type == 0)
            {
                g.Clear(Color.Black);
            }
            else if (type == 1)
            {
                g.Clear(Color.Yellow);
                g.FillRectangle(Brushes.Red, new Rectangle(0, 8, 32, 16));
            }
            else if (type == 2)
            {
                g.Clear(Color.Yellow);
                g.FillRectangle(Brushes.Red, new Rectangle(8, 0, 16, 32));
            }
            else if (type == 3)
            {
                g.Clear(Color.Yellow);
                g.FillRectangle(Brushes.Red, new Rectangle(8, 24, 16, 32));
                g.FillRectangle(Brushes.Red, new Rectangle(0, 8, 24, 16));
            }
            else if (type == 4)
            {
                g.Clear(Color.Yellow);
                g.FillRectangle(Brushes.Red, new Rectangle(8, 24, 16, 32));
                g.FillRectangle(Brushes.Red, new Rectangle(8, 8, 32, 16));
            }
            else if (type == 5)
            {
                g.Clear(Color.Yellow);
                g.FillRectangle(Brushes.Red, new Rectangle(8, 0, 16, 8));
                g.FillRectangle(Brushes.Red, new Rectangle(0, 8, 24, 16));
            }
            else if (type == 6)
            {
                g.Clear(Color.Yellow);
                g.FillRectangle(Brushes.Red, new Rectangle(8, 0, 16, 8));
                g.FillRectangle(Brushes.Red, new Rectangle(8, 8, 24, 16));
            }
            else if (type == 11)
            {
                g.Clear(Color.Yellow);
                g.FillRectangle(Brushes.Red, new Rectangle(0, 8, 32, 16));
                g.FillRectangle(Brushes.White, new Rectangle(12, 4, 8, 24));
                g.DrawRectangle(Pens.Black, new Rectangle(12, 4, 8, 24));
            }
        }
    }
}
