public void Setup()
        {
            // Initilize Xamarin Forms
            MockForms.Init();

            //This is your App.xaml and App.xaml.cs, which can have resources, etc.
            app = new App();
            Application.Current = app;

            // For now, set the engine to the Koenig Engine, change when ready
            //BattleEngineViewModel.Instance.SetBattleEngineToKoenig();
            BattleEngineViewModel.Instance.SetBattleEngineToGame();

            BattleEngineViewModel.Instance.Engine.EngineSettings.CharacterList.Clear();
            BattleEngineViewModel.Instance.Engine.EngineSettings.MonsterList.Clear();
            BattleEngineViewModel.Instance.Engine.EngineSettings.CurrentDefender = null;
            BattleEngineViewModel.Instance.Engine.EngineSettings.CurrentAttacker = null;

            var CharacterPlayer = new PlayerInfoModel(
                new CharacterModel
            {
                Speed           = 100,
                Level           = 20,
                MaxHealth       = 200,
                CurrentHealth   = 200,
                ExperienceTotal = 1,
            });

            BattleEngineViewModel.Instance.Engine.EngineSettings.CharacterList.Add(CharacterPlayer);

            BattleEngineViewModel.Instance.Engine.StartBattle(true);   // Clear the Engine

            page = new RoundOverPage();
        }
        public void Setup()
        {
            // Initilize Xamarin Forms
            MockForms.Init();

            //This is your App.xaml and App.xaml.cs, which can have resources, etc.
            app = new App();
            Application.Current = app;

            page = new RoundOverPage();
        }
Пример #3
0
        public void Setup()
        {
            // Initilize Xamarin Forms
            MockForms.Init();

            //This is your App.xaml and App.xaml.cs, which can have resources, etc.
            app = new App();
            Application.Current = app;

            // For now, set the engine to the Koenig Engine, change when ready
            BattleEngineViewModel.Instance.SetBattleEngineToGame();

            page = new RoundOverPage();
        }
        public void RoundOverPage_NextRoundButton_Clicked_Navigation_Should_Pass()
        {
            // Arrange
            RoundOverPage page1 = new RoundOverPage();

            page1.Navigation.PushAsync(new HomePage());
            page1.Navigation.PushAsync(new GamePage());
            page1.Navigation.PushAsync(new PickCharactersPage());

            // Act
            page1.NextRoundButton_Clicked(null, null);

            // Reset

            // Assert
            Assert.IsTrue(true); // Got to here, so it happened...
        }