public void testYesorNoActionequal2()
        {
            YesOrNoAction n  = new YesOrNoAction(true);
            YesOrNoAction n2 = new YesOrNoAction(false);

            Assert.IsTrue(n.Equals(n2) == false);
        }
Exemplo n.º 2
0
        private void randomInputResponse()
        {
            UserAction action;
            int        r = random.Next();

            switch (r % 10)
            {
            case 1:
                action = new CardAction(randomCard());
                break;

            case 2:
                if (random.Next() % 2 == 0)
                {
                    action = new YesOrNoAction(true);
                }
                else
                {
                    action = new YesOrNoAction(false);
                }
                break;

            case 3:
                action = new AbilityAction(randomCard(), randomPlayer());
                break;

            case 4:
                action = new AbilityActionSun(randomCard());
                break;

            default:
                action = new UseCardAction(randomCard(), randomPlayer());
                break;
            }
            game.processUserInput(game.curPhase.playerID, action);
        }
        public void testYesorNoAction2()
        {
            YesOrNoAction n = new YesOrNoAction(false);

            Assert.IsTrue(n.toString().Equals("No"));
        }
        public void testYesorNoActionequal()
        {
            YesOrNoAction n = new YesOrNoAction(true);

            Assert.IsTrue(n.Equals(n) == true);
        }
        public void testYesorNoAction()
        {
            YesOrNoAction n = new YesOrNoAction(true);

            Assert.IsTrue(n.toString().Equals("Yes"));
        }