Exemplo n.º 1
0
 public RenderCellVisitor(Graphics graphics, CellMap map, ColorAdapterDictionary color_adapters, int square_size)
 {
     this.color_adapters = color_adapters;
     this.graphics       = graphics;
     this.map            = map;
     this.square_size    = square_size;
     counter             = 0;
 }
Exemplo n.º 2
0
 public RenderCellVisitor(Graphics graphics, CellMap map, ColorAdapterDictionary color_adapters, int square_size)
 {
     this.color_adapters = color_adapters;
     this.graphics = graphics;
     this.map = map;
     this.square_size = square_size;
     counter = 0;
 }
Exemplo n.º 3
0
        public DefaultCellMap(Cell[,] array, int square_size)
        {
            this.array = array;

            counter = 0;
            this.square_size = square_size;
            ColorAdapter dead = new ColorAdapter(Color.Black);
            color_adapters = new DefaultColorAdapterDictionary(new List<KeyValuePair<string, ColorAdapter>>(), dead);
            color_adapters.Add("NoNeighbor", new ColorAdapter(Color.OrangeRed));
            color_adapters.Add("OneNeighbor",  new ColorAdapter(Color.Yellow));
            color_adapters.Add("TwoNeighbors",  new ColorAdapter(Color.Orange));
            color_adapters.Add("ThreeNeighbors",  new ColorAdapter(Color.LightYellow));
            color_adapters.Add("MoreThanThreeNeighbors",  new ColorAdapter(Color.LightGreen));
            color_adapters.Add("AlmostDead",  new ColorAdapter(Color.DimGray));
            color_adapters.Add("Dead",  dead);
            color_adapters.Add("Default",  new ColorAdapter(Color.White));
            color_adapters.Add("Side", new ColorAdapter(Color.White));
        }
Exemplo n.º 4
0
        public DefaultCellMap(Cell[,] array, int square_size)
        {
            this.array = array;

            counter          = 0;
            this.square_size = square_size;
            ColorAdapter dead = new ColorAdapter(Color.Black);

            color_adapters = new DefaultColorAdapterDictionary(new List <KeyValuePair <string, ColorAdapter> >(), dead);
            color_adapters.Add("NoNeighbor", new ColorAdapter(Color.OrangeRed));
            color_adapters.Add("OneNeighbor", new ColorAdapter(Color.Yellow));
            color_adapters.Add("TwoNeighbors", new ColorAdapter(Color.Orange));
            color_adapters.Add("ThreeNeighbors", new ColorAdapter(Color.LightYellow));
            color_adapters.Add("MoreThanThreeNeighbors", new ColorAdapter(Color.LightGreen));
            color_adapters.Add("AlmostDead", new ColorAdapter(Color.DimGray));
            color_adapters.Add("Dead", dead);
            color_adapters.Add("Default", new ColorAdapter(Color.White));
            color_adapters.Add("Side", new ColorAdapter(Color.White));
        }