Ejemplo n.º 1
0
        public void Start()
        {
            World.WriteLine(_world.Introduction);
            var newGame = true;

            while (!_world.IsEnded)
            {
                // see if we are in a new place
                if (_world.Player.Location != _currentLocation)
                {
                    _currentLocation = _world.Player.Location;

                    // we are in a new place, so describe it
                    World.WriteLine(_currentLocation.LookDescription);
                    DescribeDirections();
                }

                if (newGame)
                {
                    World.WriteLine("([?] for help)");
                    newGame = false;
                }

                Console.WriteLine("-------------------------------------------------------------------------------");

                // await command
                ProcessInput(Console.ReadLine());
            }

            World.WriteLine(_world.Outro);
            Console.ReadKey();
        }
Ejemplo n.º 2
0
 public Game(World world)
 {
     _world = world;
     _currentLocation = null;
 }