public CheckBoard() { for (int i = 0; i < board.GetLength(0); i++) { for (int j = 0; j < board.GetLength(1); j++) { if ((i == 0 || i == 7) || (j == 0 || j == 7)) { board[i, j] = new Stone("Red", i, j); continue; } board[i, j] = new Stone(null, i, j); } } board[3, 3] = new Stone("White", 3, 3); board[3, 4] = new Stone("Black", 3, 4); board[4, 3] = new Stone("Black", 4, 3); board[4, 4] = new Stone("White", 4, 4); }
public void SetStone(int x, int y, int turn) { if (turn % 2 == 0) { board[x, y] = new Stone("White", x, y); } else { board[x, y] = new Stone("Black", x, y); } }