Beispiel #1
0
		public Board(int width, int height)
		{
			Width = width;
			Height = height;
			Randomize();
			floodFiller = new FloodFiller(colors);
		}
Beispiel #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);
		}
Beispiel #3
0
 public Board(int width, int height)
 {
     Width  = width;
     Height = height;
     Randomize();
     floodFiller = new FloodFiller(colors);
 }
Beispiel #4
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);
 }
Beispiel #5
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);
        }
Beispiel #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;
		}