GetActions() публичный Метод

public GetActions ( Game game ) : List
game Game
Результат List
Пример #1
0
        public override ActionType GetBestAction(Game game)
        {
            ActionType a1 = primary.GetBestAction(game);
            ActionType a2 = secondary.GetBestAction(game);

            if (a1 != a2 && !IsDiff)
            {
                List <ActionEv> l1 = primary.GetActions(game);

                Diff = 0.0;

                if (l1 != null)
                {
                    for (int i = 0; i < l1.Count; i++)
                    {
                        if (l1[i].Action == a2)
                        {
                            Diff = l1[0].Ev - l1[i].Ev;
                            break;
                        }
                    }
                }

                IsDiff = true;
            }

            return(a1);
        }
Пример #2
0
        public override ActionType GetBestAction(Game game)
        {
            ActionType a1 = primary.GetBestAction(game);
            ActionType a2 = secondary.GetBestAction(game);

            if (a1 != a2 && !IsDiff)
            {
                List <ActionEv> l1 = primary.GetActions(game);
                List <ActionEv> l2 = secondary.GetActions(game);


                int m = 0;
                if (l1 != null)
                {
                    m = l1.Count;
                }
                if (l2 != null && l2.Count > m)
                {
                    m = l2.Count;
                }

                Console.WriteLine("STRATEGY MISMATCH");
                Console.WriteLine();
                Console.WriteLine(game.ToString());

                Console.WriteLine(string.Format("{0,-25}    {1,-25}", primary.GetType(), secondary.GetType()));
                Console.WriteLine();

                Console.WriteLine(string.Format("{0,-25}    {1,-25}", a1, a2));
                Console.WriteLine();

                for (int i = 0; i < m; i++)
                {
                    ActionEv e1 = new ActionEv(), e2 = new ActionEv();

                    if (l1 != null && i < l1.Count)
                    {
                        e1 = l1[i];
                    }
                    if (l2 != null && i < l2.Count)
                    {
                        e2 = l2[i];
                    }

                    Console.WriteLine(string.Format("{0,-25}    {1,-25}", e1, e2));
                }

                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine();
            }

            return(a1);
        }