Exemplo n.º 1
0
 public HumanInput(GameState state, InputMethod aiUpdater)
     : base(state)
 {
     this.aiUpdater = aiUpdater;
 }
Exemplo n.º 2
0
        protected void Initialize(GameState level)
        {
            state = level;

            //            state = level.Clone(p1: new Player (1, new Vector2 (90, 36)),
            //                                p2: new Player (2, new Vector2 (90, 45)));

            forwardModel = new ForwardModel (state);

            history = new List<GameState> ();

            //            ai1 = new NullAI (state, PlayerId.P1);
            ai1 = new AStar (state, PlayerId.P1, new WaypointHeuristic (state, PlayerId.P1));
            ai2 = new AStar (state, PlayerId.P2, new WaypointHeuristic (state, PlayerId.P2));

            //            listInputMethod = new ListAiInput (ai1, ai2, state);
            //            inputMethod = new SynchronizedAiInput (ai1, ai2, state);
            //            inputMethod = new HalfHumanAiInput (ai2, state);
            combinedInputMethod = new CombinedAiInput (state);
            humanInputMethod = new HumanInput (state, combinedInputMethod);

            //            inputMethod = humanInputMethod;
            inputMethod = combinedInputMethod;

            CombinedPlatformAStar cpas = new CombinedPlatformAStar (level.Platforms);
            cpas.CombinedPlatformPath (level.P1, level.P2, level.Goal, level.Goal);
            //            Environment.Exit (1);
        }