Reversi.ReversiPanel.CreateCells C# (CSharp) Method

CreateCells() private method

private CreateCells ( ) : void
return void
		private void CreateCells()
		{
			int image_width  = none_image.Width;
			int image_height = none_image.Height;

			cells = new ReversiCell[board.Width, board.Height];
			this.Controls.Clear();
			for(int x=0; x<board.Width; ++x)
				for(int y=0; y<board.Height; ++y)
				{
					ReversiCell cell = new ReversiCell(x, y, this);
					cell.Location = new Point(image_width*x, image_height*y);
					cell.Size = new Size(image_width, image_height);
					cell.SetColor(board[x, y]);
					cell.Click += new EventHandler(OnCellClick);
					this.Controls.Add(cell);
					this.cells[x,y] = cell;
				}
			this.Width = board.Width * image_width;
			this.Height = board.Height * image_height;
		}
	}//class ReversiPanel