static void Main(string[] args) { GoodsRepository goods = new GoodsRepository(); goods.Goods = new Good[] { new Good() { Name = "Test1", Count = 2, Price = 10 }, new Good() { Name = "Test2", Count = 3, Price = 15 }, new Good() { Name = "Test3", Count = 2, Price = 2 } }; WendingMachine machine = new WendingMachine(1000, goods); WendingMachine machine2 = new WendingMachine(1000, goods); WendingMachineGUI gui = new WendingMachineGUI(); gui.Machine = machine; while (true) { gui.Update(); } }
public WendingMachine(int balance, GoodsRepository goods) { Balance = balance; _goods = goods; }