Exemple #1
0
        /// <summary>
        ///     Updates the state of the game on the map.
        /// </summary>
        public void Update()
        {
            Console.WriteLine();
            Wumpus.Update(this);

            HashSet <int> roomsAdjacentToPlayer = Rooms[Player.RoomNumber];

            _hazards.ForEach(
                h => {
                if (roomsAdjacentToPlayer.Contains(h.RoomNumber))
                {
                    h.PrintHazardWarning();
                }
            });
            Player.PrintLocation();
        }