private void InitializeGrid() { grid = new ModuleContainer[width * height][]; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { grid[x + width * y] = new ModuleContainer[inputReader.GetTileTypesCount()]; for (int i = 0; i < inputReader.GetTileTypesCount(); ++i) { grid[x + width * y][i] = new ModuleContainer(inputReader.GetTileTypeAtIndex(i), x, y); } } } } // enables every posible tile for each index in grid