Ejemplo n.º 1
0
        public void drawGeneration(Graphics g)
        {
            int i, j;

            if (g == null)
            {
                g = OurWorld.CreateGraphics();
            }

            g.FillRectangle(blueBrush, 0, 0, 400, 400);
            for (i = 0; i <= 100; i++)
            {
                for (j = 0; j <= 100; j++)
                {
                    if (Arena[i + 1, j + 1] == 1)
                    {
                        g.FillRectangle(redBrush, i * 4, j * 4, 4, 4);
                    }
                }
            }
        }