/// <summary> /// Display the board with all players scores. /// </summary> /// <param name="players">All current game players.</param> public static void DisplayScoreBoard(List <Player> players) { if (!ExplorerLayout.IsActive()) { ScoreBoard.Display(players); } }
/// <summary> /// Load cards (as Playable) in the card explorer and set the layout accordingly. /// </summary> /// <param name="cards">The list of cards to load.</param> public static void ExploreCards(List <Playable> cards) { if (cards.Count > 0) { ExplorerLayout.ToggleExplorer(true); ExplorerLayout.ExploreCards(cards); } else { Debug.Log("No cards to display."); } }
/// <summary> /// Pick a card from the explorer and add it to the player's city. /// </summary> /// <param name="id">The id of the selected card.</param> public static bool SelectCardToBuild(string id) { Card card = GameManager.GetCardById(id); if (Player.City.Build(card, true)) { ExplorerLayout.ToggleExplorer(false); if (GameManager.Age > 3) { DisplayScoreBoard(GameManager.Instance().Players); } return(true); } else { Debug.Log("Build impossible: building is already in the city."); return(false); } }
/// <summary> /// Show explorer control /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ExplorerMenuItem_OnClick(object sender, RoutedEventArgs e) { ExplorerLayout.Show(); }