示例#1
0
        public void TestMapBehavior()
        {
            Player            DummyPlayer = new Player("Player 1", "Human", true, false, 0, new Card[] { new Card(), new Card(), new Card() });
            SorcererStreetMap DummyMap    = CreateDummyMap();

            DummyMap.ListPlayer.Add(DummyPlayer);

            DummyMap.Update(new GameTime());

            //Assert.IsInstanceOfType(DummyMap.ListActionMenuChoice.Last(), typeof(ActionPanelGainPhase));
            //Assert.IsFalse(DummyMap.ListActionMenuChoice.HasSubPanels);

            //ActionPanelGainPhase GainPhase = (ActionPanelGainPhase)DummyMap.ListActionMenuChoice.Last();
            //GainPhase.FinishPhase();

            Assert.IsInstanceOfType(DummyMap.ListActionMenuChoice.Last(), typeof(ActionPanelDrawCardPhase));
            Assert.IsFalse(DummyMap.ListActionMenuChoice.HasSubPanels);

            ActionPanelDrawCardPhase DrawCardPhase = (ActionPanelDrawCardPhase)DummyMap.ListActionMenuChoice.Last();

            DrawCardPhase.FinishPhase();

            Assert.IsInstanceOfType(DummyMap.ListActionMenuChoice.Last(), typeof(ActionPanelCardSelectionPhase));
            Assert.IsFalse(DummyMap.ListActionMenuChoice.HasSubPanels);

            ActionPanelCardSelectionPhase CardSelectionPhase = (ActionPanelCardSelectionPhase)DummyMap.ListActionMenuChoice.Last();

            CardSelectionPhase.PrepareToRollDice();

            Assert.IsInstanceOfType(DummyMap.ListActionMenuChoice.Last(), typeof(ActionPanelRollDicePhase));
            Assert.IsFalse(DummyMap.ListActionMenuChoice.HasSubPanels);

            ActionPanelRollDicePhase RollDicePhase = (ActionPanelRollDicePhase)DummyMap.ListActionMenuChoice.Last();

            RollDicePhase.RollDice();

            Assert.IsInstanceOfType(DummyMap.ListActionMenuChoice.Last(), typeof(ActionPanelChooseDirection));
            Assert.IsTrue(DummyMap.ListActionMenuChoice.HasSubPanels);

            ActionPanelChooseDirection ChooseDirection = (ActionPanelChooseDirection)DummyMap.ListActionMenuChoice.Last();

            DummyPlayer.CurrentDirection = Player.Directions.Right;
            ChooseDirection.FinalizeChoice();

            Assert.IsInstanceOfType(DummyMap.ListActionMenuChoice.Last(), typeof(ActionPanelMovementPhase));
            Assert.IsFalse(DummyMap.ListActionMenuChoice.HasSubPanels);

            while (DummyMap.ListActionMenuChoice.Last() is ActionPanelMovementPhase)
            {
                DummyMap.Update(new GameTime());
            }

            Assert.IsInstanceOfType(DummyMap.ListActionMenuChoice.Last(), typeof(ActionPanelCardSelectionPhase));
            Assert.IsFalse(DummyMap.ListActionMenuChoice.HasSubPanels);

            ActionPanelCardSelectionPhase CreatureCardSelectionPhase = (ActionPanelCardSelectionPhase)DummyMap.ListActionMenuChoice.Last();
        }
示例#2
0
        public void TestRollDicePhaseWithoutDirection()
        {
            Player                   DummyPlayer   = new Player("Player 1", "Human", true, false, 0, new Card[0]);
            SorcererStreetMap        DummyMap      = CreateDummyMap();
            ActionPanelRollDicePhase RollDicePhase = new ActionPanelRollDicePhase(DummyMap, DummyPlayer);

            RollDicePhase.RollDice();

            Assert.IsInstanceOfType(DummyMap.ListActionMenuChoice.Last(), typeof(ActionPanelChooseDirection));
        }
示例#3
0
        public void TestRollDicePhaseGoingRight()
        {
            Player DummyPlayer = new Player("Player 1", "Human", true, false, 0, new Card[0]);

            DummyPlayer.CurrentDirection = Player.Directions.Right;
            SorcererStreetMap        DummyMap      = CreateDummyMap();
            ActionPanelRollDicePhase RollDicePhase = new ActionPanelRollDicePhase(DummyMap, DummyPlayer);

            RollDicePhase.RollDice();

            Assert.IsInstanceOfType(DummyMap.ListActionMenuChoice.Last(), typeof(ActionPanelMovementPhase));
        }