static void Main(string[] args) { Character player = new Character("Player1"); ShopKeeper merchant = new ShopKeeper(); Shop weaponStore = new Shop(player, merchant); player.LoadPlayer("Player.txt"); merchant.LoadMerchant("Shop.txt"); if (player.GetName == "Player1") { Console.WriteLine("Name your character before entering the shop.\n"); player.GetName = Console.ReadLine(); } weaponStore.ShopMenu(); player.SavePlayer("Player.txt"); merchant.SaveMerchant("Shop.txt"); Console.ReadKey(); }
//Constructor for the Shop passes in a player and a shop keeper. public Shop(Character player, ShopKeeper merchant) { _player = player; _merchant = merchant; }