예제 #1
0
파일: RobotNav.cs 프로젝트: elodea/RobotNav
        public void Init()
        {
            searchStrategy = SearchStrategyFactory.Create(Filename, Method, popSize, mutRate, fitMulti, diversity, elite, deepeningInc);
            inputHandler   = new InputHandler(searchStrategy, this);

            //resize window so it looks better
            SwinGame.ChangeScreenSize(searchStrategy.fMap.Width * searchStrategy.gridW, searchStrategy.fMap.Height * searchStrategy.gridH + 155);

            if (forceStart)
            {
                searchStrategy.Start();
                forceStart = false;
            }

            PathSize = 0;
        }
예제 #2
0
 public InputHandler(SearchStrategy strategy, IRobotNav robotNav)
 {
     this.strategy = strategy;
     this.robotNav = robotNav;
 }