public Course Generate(float areaRadius)
        {
            var course = new Course();
            var trackPieces = new List<CourseTrackpiece>();

            float maxRadius = areaRadius;
            float minRadius = areaRadius * 0.8f;
            int numAnchors = Random.Range(4, 6);

            PlaceGoal(course, trackPieces);
            var anchorList = PlaceAnchors(numAnchors, minRadius, maxRadius);
            ConnectAnchors(trackPieces, anchorList);

            course.Track = trackPieces.ToArray();
            return course;
        }
        private void PlaceGoal(Course course, List<CourseTrackpiece> trackPieces)
        {
            trackPieces.Add(new CourseTrackpiece
            {
                Id = 0,
                PosX = 0,
                PosY = 0,
                PosZ = 0,
                Rotation = 0,
                PieceName = "GOAL"
            });

            course.Spawnpoint = new CourseSpawnpoint();
            course.Spawnpoint.Direction = 0;
            course.Spawnpoint.SpawnAt = 0;
        }