public void Play(int position, SquareOwner player) { if (!PositionIsValid(position)) { throw new Exception("Invalid position"); } double rowPosition = position / 3; int row = (int)Math.Floor(rowPosition); int col = position % 3; this.board[row][col].owner = player; }
public Square() { owner = SquareOwner.UNOWNED; }