public void SwitchLocation(Location location) { if (location == null || location == game.CurrentLocation) { return; } game.CurrentLocation = location; clearShopsInGui(); addShopsInGuiForLocation(game.CurrentLocation); UpdateForm(); }
public void Remove(Location location) { locations.Remove(location); }
public void Add(Location location) { locations.Add(location); }
public Player(string name, Location location, Money money) : this(name) { Location = location; this.money = money; }
/// <summary> /// Adds the shops that are in the location to the GUI /// </summary> /// <param name="location">The location that contains the shops</param> private void addShopsInGuiForLocation(Location location) { foreach (Shop shop in location.Shops) { addShopInGui(shop); } }
/// <summary> /// Adds a location to the GUI /// </summary> /// <param name="location">The location you wish to add</param> private void addLocationInGui(Location location) { locationComboBox.Items.Add(location); locationToolStripMenuItem.DropDown.Items.Add(location.Name); locationToolStripMenuItem.DropDown.Items[locationToolStripMenuItem.DropDown.Items.Count - 1].Click += new EventHandler(locationItemsToolStripMenuItem_Click); }