ToString() public method

public ToString ( ) : string
return string
Exemplo n.º 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);
                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);
        }
Exemplo n.º 2
0
        public override bool TakeInsurance(Game game)
        {
            bool take1 = primary.TakeInsurance(game);
            bool take2 = secondary.TakeInsurance(game);

            if (take1 != take2)
            {
                Console.WriteLine("Insurance mismatch: " + take1 + " <> " + take2);
                Console.WriteLine(game.ToString());
            }

            return(take1);
        }
Exemplo n.º 3
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;
        }
Exemplo n.º 4
0
        public override bool TakeInsurance(Game game)
        {
            bool take1 = primary.TakeInsurance(game);
            bool take2 = secondary.TakeInsurance(game);

            if (take1 != take2)
            {
                Console.WriteLine("Insurance mismatch: " + take1 + " <> " + take2);
                Console.WriteLine(game.ToString());
            }

            return take1;
        }