Could someone tell me how I can improve this please? It's similar to my other question just another version of it.using System;using System.Collections.Generic;using System.Globalization;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Sahara.Base.Game.Rooms{    internal class ActiveRoomModel : IDisposable    {        private readonly bool _clubOnly;        private readonly int _doorX;        private readonly int _doorY;        private readonly double _doorZ;        private readonly int _doorDirection;        private string _modelHeightmap;        private int _modelSizeX;        private int _modelSizeY;        private short[,] _squareFloorHeight;        private byte[,] _squareSeatRotation;        private SquareState[,] _squareState;        private RoomModel _staticModel;        private readonly string _dependantHeightmap;        public ActiveRoomModel(RoomModel staticModel)        {            _staticModel = staticModel;            _doorX = staticModel.DoorX;            _doorY = staticModel.DoorY;            _doorZ = staticModel.DoorZ;            _doorDirection = staticModel.DoorDirection;            _modelHeightmap = staticModel.Heightmap;            _modelSizeX = staticModel.ModelSizeX;            _modelSizeY = staticModel.ModelSizeY;            _clubOnly = staticModel.ClubOnly;            _dependantHeightmap = string.Empty;            _squareState = new SquareState[_modelSizeX, _modelSizeY];            _squareFloorHeight = new short[_modelSizeX, _modelSizeY];            _squareSeatRotation = new byte[_modelSizeX, _modelSizeY];            for (var y = 0; y < _modelSizeY; y++)            {                for (var x = 0; x < _modelSizeX; x++)                {                    if (x > (staticModel.ModelSizeX - 1) || y > (staticModel.ModelSizeY - 1))                    {                        _squareState[x, y] = SquareState.Blocked;                    }                    else                    {                        _squareState[x, y] = staticModel.SquareState[x, y];                        _squareFloorHeight[x, y] = staticModel.SquareFloorHeight[x, y];                        _squareSeatRotation[x, y] = staticModel.SquareSeatRotation[x, y];                    }                }            }            var floorMap = new StringBuilder();            for (var y = 0; y < _modelSizeY; y++)            {                for (var x = 0; x < _modelSizeX; x++)                {                    if (x == _doorX && y == _doorY)                    {                        floorMap.Append(_doorZ > 9 ? ((char)(87 + _doorZ)).ToString() : _doorZ.ToString());                        continue;                    }                    if (_squareState[x, y] == SquareState.Blocked)                    {                        floorMap.Append('x');                        continue;                    }                    double height = _squareFloorHeight[x, y];                    floorMap.Append(height > 9 ? ((char)(87 + height)).ToString() : height.ToString());                }                floorMap.Append(Convert.ToChar(13));            }            _dependantHeightmap = floorMap.ToString();        }        public string DependantHeightmap => _dependantHeightmap;        public bool DoorCorrect => _doorX <= _squareFloorHeight.GetUpperBound(0) && _doorY <= _squareFloorHeight.GetUpperBound(1);        public void AppendXCordinate()        {            _modelSizeX++;            UpdateSquareArrays();        }        public void AppendYCordinate()        {            _modelSizeY++;            UpdateSquareArrays();        }        public void CreateMap(int x, int y)        {            _modelSizeX = x;            _modelSizeY = y;            UpdateSquareArrays();        }        private void UpdateSquareArrays()        {            var newSqState = new SquareState[_modelSizeX + 1, _modelSizeY + 1];            var newSqFloorHeight = new short[_modelSizeX + 1, _modelSizeY + 1];            var newSqSeatRot = new byte[_modelSizeX + 1, _modelSizeY + 1];            for (var y = 0; y < _modelSizeY; y++)            {                for (var x = 0; x < _modelSizeX; x++)                {                    if (x > (_staticModel.ModelSizeX - 1) || y > (_staticModel.ModelSizeY - 1))                    {                        newSqState[x, y] = SquareState.Blocked;                    }                    else                    {                        newSqState[x, y] = _squareState[x, y];                        newSqFloorHeight[x, y] = _squareFloorHeight[x, y];                        newSqSeatRot[x, y] = _squareSeatRotation[x, y];                    }                }            }            _squareState = newSqState;            _squareFloorHeight = newSqFloorHeight;            _squareSeatRotation = newSqSeatRot;        }        public void Dispose()        {            Array.Clear(_squareState, 0, _squareState.Length);            _squareState = null;            Array.Clear(_squareFloorHeight, 0, _squareFloorHeight.Length);            _squareFloorHeight = null;            Array.Clear(_squareSeatRotation, 0, _squareSeatRotation.Length);            _squareSeatRotation = null;            _staticModel = null;            _modelHeightmap = null;        }    }}RoomModel:using System;namespace Sahara.Base.Game.Rooms{    internal sealed class RoomModel    {        private readonly bool _clubOnly;        private readonly int _doorX;        private readonly int _doorY;        private readonly double _doorZ;        private readonly int _doorDirection;        private readonly string _modelHeightmap;        private readonly int _modelSizeX;        private readonly int _modelSizeY;        private readonly int _wallHeight;        private readonly short[,] _squareFloorHeight;        private readonly byte[,] _squareSeatRotation;        private readonly SquareState[,] _squareState;        private readonly string _modelFurniMap;        private readonly bool _publicPool;        private readonly byte[,] _roomModelEffects;        public RoomModel(bool clubOnly, int doorPositionX, int doorPositionY, int wallHeight, double doorPositionZ, int doorDirection, string modelHeightMap, string modelFurniMap, string poolMap)        {            _doorX = doorPositionX;            _doorY = doorPositionY;            _doorZ = doorPositionZ;            _doorDirection = doorDirection;            _wallHeight = wallHeight;            _modelHeightmap = modelHeightMap.ToLower();            _modelFurniMap = modelFurniMap;            if (poolMap != string.Empty)            {                _publicPool = true;                _roomModelEffects = new byte[_modelSizeX, _modelSizeY];            }            var temporaryHeightmap = _modelHeightmap.Split(Convert.ToChar(13));            _modelSizeX = temporaryHeightmap[0].Length;            _modelSizeY = temporaryHeightmap.Length;            _clubOnly = clubOnly;            _squareState = new SquareState[_modelSizeX, _modelSizeY];            _squareFloorHeight = new short[_modelSizeX, _modelSizeY];            _squareSeatRotation = new byte[_modelSizeX, _modelSizeY];            for (var y = _modelSizeY - 1; y >= 0; y--)            {                var line = temporaryHeightmap[y].Replace(Environment.NewLine, string.Empty);                var x = 0;                foreach (var modelSquare in line)                {                    if (modelSquare == 'x')                    {                        _squareState[x, y] = Rooms.SquareState.Blocked;                    }                    else                    {                        _squareState[x, y] = Rooms.SquareState.Open;                        _squareFloorHeight[x, y] = Sahara.GetServer().GetUtility().ParseModelSquare(modelSquare);                    }                    x++;                }            }        }        public int DoorX => _doorX;        public int DoorY => _doorY;        public double DoorZ => _doorZ;        public int DoorDirection => _doorDirection;        public string Heightmap => _modelHeightmap;        public int ModelSizeX => _modelSizeX;        public int ModelSizeY => _modelSizeY;        public bool ClubOnly => _clubOnly;        public SquareState[,] SquareState => _squareState;        public short[,] SquareFloorHeight => _squareFloorHeight;        public byte[,] SquareSeatRotation => _squareSeatRotation;        public bool PublicPool => _publicPool;    }}SquareState:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Sahara.Base.Game.Rooms{    public enum SquareState    {        Open = 0,        Blocked = 1,        Seat = 2,        Pool = 3,        Vip = 4    }}
ActiveRoomModel
c#