Esempio n. 1
0
 public static void Start()
 {
     //this code will be managed in encounter class
     players.Add(new Player("adil"));
     players.Add(new Player("jarvis"));
     //players[1].hp = 100;
     Encounter.Battle(players, new List <Character>()
     {
         new RagingRoach()
     });
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var heroes = new List <Human>()
            {
                new Ninja(),
                new Samurai(),
                new Wizard()
            };

            ILocation location = new Lobby();

            System.Console.WriteLine("You have arrived at the Doding Cojo!");
            System.Console.WriteLine("Welcome and watch your step!");
            System.Console.WriteLine();

            while (heroes.Exists(x => x.Health > 0) ||
                   location.NextLocations.Count == 0 && location.Enemies.Count == 0)
            {
                var ex = new Explore(location);

                if (location.Enemies.Count > 0)
                {
                    System.Console.WriteLine();
                    var e = new Encounter(heroes, location.Enemies);
                    e.Battle();
                }

                if (location.NextLocations.Count == 0)
                {
                    break;
                }

                location = ex.Move();
            }

            // System.Console.WriteLine("Game Over...");
            System.Console.WriteLine("To be continued...");
        }