Terrarium.Game.WorldState.ClearIndex C# (CSharp) Method

ClearIndex() public method

Clear the current cell index.
public ClearIndex ( ) : void
return void
        public void ClearIndex()
        {
            if (_isImmutable)
            {
                throw new ApplicationException("WorldState must be mutable to re-add organisms.");
            }

            for (var x = 0; x < _gridWidth; x++)
            {
                for (var y = 0; y < _gridHeight; y++)
                {
                    _cellOrganisms[x, y] = null;
                }
            }

            _indexBuilt = false;
        }