Пример #1
0
 public Board(int width, int height)
 {
     Width  = width;
     Height = height;
     Randomize();
     floodFiller = new FloodFiller(colors);
 }
Пример #2
0
 // Used to populate the board in a networked game
 public Board(Data data)
 {
     Width  = data.Width;
     Height = data.Height;
     SetColors(data.Colors);
     floodFiller = new FloodFiller(colors);
 }
Пример #3
0
        public int GetConnectedColorsCount(Vector2D square)
        {
            var testFloodFiller = new FloodFiller((Color[, ])colors.Clone());

            testFloodFiller.SetColor((int)square.X, (int)square.Y, Color.TransparentWhite);
            return(testFloodFiller.ProcessedCount);
        }
Пример #4
0
		public Board(int width, int height)
		{
			Width = width;
			Height = height;
			Randomize();
			floodFiller = new FloodFiller(colors);
		}
Пример #5
0
		// Used to populate the board in a networked game
		public Board(Data data)
		{
			Width = data.Width;
			Height = data.Height;
			SetColors(data.Colors);
			floodFiller = new FloodFiller(colors);
		}
Пример #6
0
		public int GetConnectedColorsCount(Vector2D square)
		{
			var testFloodFiller = new FloodFiller((Color[,])colors.Clone());
			testFloodFiller.SetColor((int)square.X, (int)square.Y, Color.TransparentWhite);
			return testFloodFiller.ProcessedCount;
		}