private GameBoard(GameBoard other) { size = other.size; stacks = other.StacksCopy; // deep copy state = other.state; turn = other.turn; whiteStones = other.whiteStones.Clone(); blackStones = other.blackStones.Clone(); Test = false; }
public GameBoard(int size) { if (size < 3 || size > 8) { throw new TakException("Minimum board size is 3. Maximum board size is 8."); } turn = Colour.White; this.size = size; stacks = new StoneStack[size, size]; state = GameState.InProgress; whiteStones = new StoneReserve(size); blackStones = new StoneReserve(size); for (int x = 0; x < size; x++) { for (int y = 0; y < size; y++) { stacks[x, y] = new StoneStack(); } } }
StoneReserve(StoneReserve other) { flatstones = other.flatstones; capstones = other.capstones; }