예제 #1
0
        private void decidedMethod()
        {
            var decided = _decided;

            Agent.Direction dir = Agent.CastPointToDir(new Point(decided.MeAgent1.X, decided.MeAgent1.Y));
            gameManager.OrderToAgent(new Order(managerNum * 2, dir, Agent.State.MOVE));
            dir = Agent.CastPointToDir(new Point(decided.MeAgent2.X, decided.MeAgent2.Y));
            gameManager.OrderToAgent(new Order(managerNum * 2 + 1, dir, Agent.State.MOVE));
        }
예제 #2
0
        private void Decisions2P_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var decided = (MCTProcon29Protocol.Methods.Decided)((ListBox)sender).SelectedItem;

            if (decided == null)
            {
                return;
            }
            Agent.Direction dir = Agent.CastPointToDir(new Point(decided.MeAgent1.X, decided.MeAgent1.Y));
            gameManager.OrderToAgent(new Order(2, dir, Agent.State.MOVE));
            dir = Agent.CastPointToDir(new Point(decided.MeAgent2.X, decided.MeAgent2.Y));
            gameManager.OrderToAgent(new Order(3, dir, Agent.State.MOVE));
        }
        public void SetDecisions(int index, DecidedEx decideds)
        {
            if (index == 0)
            {
                viewModel.Decisions1P = decideds.Data;
                viewModel.Decisions1PSelectedIndex = 0;
            }
            else
            {
                viewModel.Decisions2P = decideds.Data;
                viewModel.Decisions2PSelectedIndex = 0;
            }
            var decided = decideds[0];

            Agent.Direction dir = Agent.CastPointToDir(new Point(decided.MeAgent1.X, decided.MeAgent1.Y));
            OrderToAgent(new Order(index * 2, dir, Agent.State.MOVE));
            dir = Agent.CastPointToDir(new Point(decided.MeAgent2.X, decided.MeAgent2.Y));
            OrderToAgent(new Order(index * 2 + 1, dir, Agent.State.MOVE));
        }
예제 #4
0
 public Order(int agentNum_, Agent.Direction direction_, Agent.State state_)
 {
     agentNum  = agentNum_;
     direction = direction_;
     state     = state_;
 }