Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Debug.Trace("Debug works :)");

            while (true)
            {
                Display.Init(80, 35);

                IntroResult introResult;
                if (false)
                {
                    introResult = IntroSequence.Run();
                }
                else
                {
                    introResult = new IntroResult
                    {
                        PlayerName = IntroSequence.RandomPlayerName()
                    };
                }

                Display.ReadKey();
                Game game = new Game(introResult);
                try
                {
                    game.Run();
                } catch (EndGameException e) {
                    Display.Clear(true);

                    // draw game over screen
                    Console.SetCursorPosition(0, 0);
                    Utils.WriteOneByOne($"Agent {e.Player.Name} was found dead in {e.Player.Room.Proto.Name} by a rescue team.", 10);
                    Console.WriteLine();
                    Utils.WriteOneByOne($"The rescue team did not manage to recover the L.O.O.P and the agency has recruited another agent.", 10);
                    Console.WriteLine();
                    Thread.Sleep(700);
                    Console.WriteLine();
                    Utils.WriteOneByOne($"LVL: {e.Player.Level}", 10);
                    Console.WriteLine();
                    Utils.WriteOneByOne($"HP:  {e.Player.MaxHP}", 10);
                    Console.WriteLine();
                    Utils.WriteOneByOne($"STR: {e.Player.MaxStrength}", 10);
                    Console.WriteLine();

                    Thread.Sleep(400);
                    Console.WriteLine();
                    Utils.WriteOneByOne($"Press any key to try again as another agent", 5);

                    Display.ReadKey();
                }
            }
        }
Ejemplo n.º 2
0
        public static IntroResult Run()
        {
            var result = new IntroResult();

            Display.Clear(true);
            Console.SetCursorPosition(0, 0);
            Console.CursorVisible = true;

            Utils.WriteOneByOne("Welcome Agent: ", 100);
            result.PlayerName = Console.ReadLine();
            result.PlayerName = result.PlayerName.Trim();

            if (result.PlayerName == string.Empty)
            {
                result.PlayerName = RandomPlayerName();
            }

            Console.WriteLine();

            Utils.WriteOneByOne($"Agent {result.PlayerName}, last night at 0400 hours we had a break in.", 50);
            Console.WriteLine();
            Console.WriteLine();
            Thread.Sleep(400);
            Utils.WriteOneByOne($"We are going to need your help to retrieve the L.O.O.P that was stolen.", 50);
            Console.WriteLine();
            Console.WriteLine();
            Thread.Sleep(400);
            Utils.WriteOneByOne($"The Loop Oriented Oscillating Processor is crucial to our survival on this alien planet", 50);
            Console.WriteLine();
            Console.WriteLine();
            Thread.Sleep(400);
            Utils.WriteOneByOne($"Without it we are doomed", 50);
            Utils.WriteOneByOne($"...", 200);
            Console.WriteLine();
            Console.WriteLine();
            Thread.Sleep(700);
            Utils.WriteOneByOne("Godspeed agent, we are counting on you...", 100);
            Console.WriteLine();

            Display.ReadKey();

            Display.Clear(true);

            return(result);
        }
Ejemplo n.º 3
0
 public Game(IntroResult introResult)
 {
     this.introResult = introResult;
     Instance         = this;
 }