Ejemplo n.º 1
0
        public void DoInitialStrategy()
        {
            while (State != AgentState.Dead)
            {
                switch (State)
                {
                case AgentState.SearchingForGame:
                    ActionToComplete = ActionType.SearchingForGame;
                    BeginSend(new GetGamesMessage().Serialize());
                    break;

                case AgentState.Joining:
                    TryJoinGame();
                    break;

                case AgentState.AwaitingForStart:
                    Player.DoStrategy();
                    break;
                }
                WaitForActionComplete();
            }
        }