private void update() { graphics.Clear(Color.Transparent); board = b.GetBoard(); for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { if (board[i, j] != null) { graphics.DrawImage(board[j, i].img, new Rectangle(i * (width / 8), j * (hieght / 8), width / 8, hieght / 8)); } } } pictureBox2.Image = piecesimg; }