Beispiel #1
0
        private static void AddWarpPointToSystem(Game result, StarSystem system)
        {
            StarSystem targetSystem = new StarSystem();
            int counter = 0;
            while (targetSystem.GalacticCoordinates.X == -1 && counter<25)
            {
                targetSystem = NearestSystemNotConnected(result, system);
                counter++;
            }
            if (targetSystem.GalacticCoordinates.X != -1)
            {
                // create points and assign opposite systems
                WarpPoint thisSide = new WarpPoint();
                WarpPoint thatSide = new WarpPoint();

                // This side of the Warp Point
                thisSide.StrategicPosition = WarpPointLocation(system);
                thisSide.Name = targetSystem.Name;
                thisSide.StrategicSystem = system;
                thisSide.LinkedSystem = targetSystem;
                thisSide.LinkedWarpPoint = thatSide;
                system.StrategicLocations[thisSide.StrategicPosition.X, thisSide.StrategicPosition.Y].Stellars.Add(thisSide);

                // Other side of the Warp Point
                thatSide.StrategicPosition = WarpPointLocation(targetSystem);
                thatSide.Name = system.Name;
                thatSide.StrategicSystem = targetSystem;
                thatSide.LinkedSystem = system;
                thatSide.LinkedWarpPoint = thisSide;
                targetSystem.StrategicLocations[thatSide.StrategicPosition.X, thatSide.StrategicPosition.Y].Stellars.Add(thatSide);
            }
        }
Beispiel #2
0
        private static void AddWarpPointToSystem(Game result, StarSystem system)
        {
            StarSystem targetSystem = new StarSystem();
            targetSystem = NearestSystemNotConnected(result, system);

            // create points and assign opposite systems
            WarpPoint thisSide = new WarpPoint();
            WarpPoint thatSide = new WarpPoint();

            // This side of the Warp Point
            thisSide.StrategicPosition = WarpPointLocation(system);
            thisSide.Name = targetSystem.Name;
            thisSide.StrategicSystem = system;
            thisSide.LinkedSystem = targetSystem;
            thisSide.LinkedWarpPoint = thatSide;
            system.StrategicLocations[thisSide.StrategicPosition.X, thisSide.StrategicPosition.Y].Stellars.Add(thisSide);

            // Other side of the Warp Point
            thatSide.StrategicPosition = WarpPointLocation(targetSystem);
            thatSide.Name = system.Name;
            thatSide.StrategicSystem = targetSystem;
            thatSide.LinkedSystem = system;
            thatSide.LinkedWarpPoint = thisSide;
            targetSystem.StrategicLocations[thatSide.StrategicPosition.X, thatSide.StrategicPosition.Y].Stellars.Add(thatSide);
        }