public Field() { _tileManager = new TileManager(this); NullTile = new Tile(_tileManager, -1, -1); TurnActions = new SortedList<int, Action> {{0, () => _tileManager.NextTurn()}}; }
internal void Clear(int mWidth, int mHeight) { Width = mWidth; Height = mHeight; Tiles = new Tile[mWidth,mHeight]; EntitiesToUpdate.Clear(); Repository.Clear(); for (var iY = 0; iY < Height; iY++) for (var iX = 0; iX < Width; iX++) Tiles[iX, iY] = new Tile(this, iX, iY); }