Exemplo n.º 1
0
        public void showPlaceInfo()
        {
            string placeCommand = place.showPlaceInformation();

            if (placeCommand == "s" && place.Shop == true)
            {
                Shop shop = new Shop();
                hero = shop.showShopItems(hero);
            }
            else if (placeCommand == "b" && place.Bed == true)
            {
                Bed bed = new Bed();
                hero = bed.useBed(hero);
            }
            else if (placeCommand == "a" && place.Arena == true)
            {
                EnemyArena enemyArena = new EnemyArena();
                hero = enemyArena.pickEnemyToFight(hero);
            }
            else if (placeCommand == "f" && place.Forge == true)
            {
                Forge forge = new Forge();
                hero = forge.showForgeOptions(hero);
            }
            else if (placeCommand == "n" && place.NextPlace != null)
            {
                place        = place.goToNextPlace();
                hero.PlaceId = place.Id;
                heroBusiness.Update(hero);
            }
            else if (placeCommand == "p" && place.PrevPlace != null)
            {
                place        = place.goToPrevPlace();
                hero.PlaceId = place.Id;
                heroBusiness.Update(hero);
            }
        }