Beispiel #1
0
        public AlgoWayOptimizer(GameState gs, AlgoDummy algo)
        {
            LinkPlan nwLink = new LinkPlan(gs.PortalInfos.Count);

            for (int i = 0; i < gs.PortalData.Count; i++)
            {
                foreach (KeyValuePair <int, bool> link in gs.PortalData[i].SideLinks)
                {
                    if (link.Value)
                    {
                        nwLink.addLink(i, link.Key);
                    }
                }
            }
            init(gs, nwLink, algo);
        }
Beispiel #2
0
        private void init(GameState gs, LinkPlan linkPlan, AlgoDummy algo)
        {
            this.gs   = gs;
            this.algo = algo;

            index = new Dictionary <PointD, int>();
            for (int i = 0; i < gs.PortalInfos.Count; i++)
            {
                PortalInfo pInfo = gs.PortalInfos[i];
                index[pInfo.Pos] = i;
            }
            this.lp = linkPlan;



            List <int> remPortals = getConvexLinkOrder();
        }
Beispiel #3
0
 public AlgoWayOptimizer(GameState gs, LinkPlan linkPlan, AlgoDummy algo)
 {
     init(gs, linkPlan, algo);
 }