public DropDownMenu[] GetMoveFromMenus() { var list = new List<DropDownMenu>(); var hexes = HexBoard.GetInstance().GetMoveFromHexes(); foreach(var hex in hexes) { var menu = new DropDownMenu(); menu.Heading = "Move from"; menu.Hex = hex; menu.MenuItems = hex.GetShipsCurrentPlayer().Select(x => x.Name).ToArray(); list.Add(menu); } return list.ToArray(); }
public List<DropDownMenu> GetExploreToMenus(int x, int y) { var hexes = GetExploreToHexes(x, y); var nextUpkeep = GameState.GetInstance().CurrentPlayer.PlayerBoard.GetNextUpkeep(); var upkeep = GameState.GetInstance().CurrentPlayer.PlayerBoard.GetUpkeep(); var msg = string.Format("Add influence +{0} upkeep = {1}",nextUpkeep-upkeep,nextUpkeep); var list = new List<DropDownMenu>(); foreach(var hex in hexes) { var menu = new DropDownMenu(); menu.Heading = "Explore to"; menu.Hex = hex; menu.MenuItems = new String[] { msg, "No influence" }; list.Add(menu); } return list; }