Пример #1
0
 /// <summary>
 /// constructor to create the console view, send all major data objects
 /// </summary>
 /// <param name="myPlayer">active player object</param>
 /// <param name="hall">current hall object</param>
 /// <param name="hall">current guest list object</param>
 public ConsoleView(Player myPlayer, Hall hall, GameItemInventory gameItems)
 {
     _myPlayer      = myPlayer;
     _hall          = hall;
     _gameInventory = gameItems;
     InitializeConsoleWindow();
 }
        // Demo
        /// <summary>
        /// Initialize starting game inventory
        /// </summary>
        public void InitializeGameInventory()
        {
            _gameInventory = new GameItemInventory();

            _gameInventory.GameItems.Add(
                new GameItem
            {
                Name                = "Golden Goose",
                ItemType            = GameItem.GameItenType.GeneralObject,
                CurrentLocation     = 1,
                IsInPlayerInventory = false
            }
                );

            _gameInventory.GameItems.Add(
                new GameItem
            {
                Name                = "Golden Goose",
                ItemType            = GameItem.GameItenType.GeneralObject,
                CurrentLocation     = 1,
                IsInPlayerInventory = false
            }
                );

            _gameInventory.GameItems.Add(
                new GameItem
            {
                Name                = "Crystal Key",
                ItemType            = GameItem.GameItenType.Key,
                CurrentLocation     = 1,
                IsInPlayerInventory = false
            }
                );

            _gameInventory.GameItems.Add(
                new GameItem
            {
                Name                = "Thumper Emerald",
                ItemType            = GameItem.GameItenType.Jewel,
                CurrentLocation     = 0,
                IsInPlayerInventory = false
            }
                );
        }