private void NewMap()
    {
        _cubeCoordinates.Construct(10);

        // Remove 25% of Coordinates except 0,0,0
        foreach (Vector3 cube in _cubeCoordinates.GetCubesFromContainer("all"))
        {
            if (cube == Vector3.zero)
            {
                continue;
            }

            if (Random.Range(0.0f, 100.0f) < 25.0f)
            {
                _cubeCoordinates.RemoveCube(cube);
            }
        }

        // Remove Coordinates not reachable from 0,0,0
        _cubeCoordinates.RemoveCubes(
            _cubeCoordinates.BooleanDifferenceCubes(
                _cubeCoordinates.GetCubesFromContainer("all"),
                _cubeCoordinates.GetReachableCubes(Vector3.zero, 10)
                )
            );

        // Display Coordinates
        _cubeCoordinates.ShowCoordinatesInContainer("all");

        // Construct Examples
        ConstructExamples();
    }
Esempio n. 2
0
        private void NewMap()
        {
            Debug.Log("NEW MAP");
            _cubeCoordinates.Construct(10);



            // Display Coordinates
            _cubeCoordinates.ShowCoordinatesInContainer("all");

            // Construct Examples
            ConstructExamples();
        }