You can create a "square" class:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; class Square:PictureBox { private bool color; private char piece; }
and define an array to place 8x8 squares.
public partial class Form1 : Form { Square[,] square = new Square[8, 8]; public Form1() { InitializeComponent(); int i, j; for (i = 0; i < 8; i++) { for (j = 0; j < 8; j++) { this.square[i, j] = new Square();
Alon adler
source share