public FixedMap(int mapSize) { _mapSize = mapSize; _nodes = new ITerrainNode[mapSize, mapSize]; for (var i = 0; i < _mapSize; i++) { for (var j = 0; j < _mapSize; j++) { _nodes[i, j] = new HexNode(i, j); } } }
private ITerrainNode[,] CreateSegment(int segmentX, int segmentY) { var matrix = new ITerrainNode[_segmentSize, _segmentSize]; for (var i = 0; i < _segmentSize; i++) { for (var j = 0; j < _segmentSize; j++) { matrix[i, j] = new HexNode(i + segmentX * _segmentSize, j + segmentY * _segmentSize); } } var key = new SegmentKey(segmentX, segmentY); _segmentDict[key] = matrix; return(matrix); }