/// <summary> /// Gets the top most element of the list of game elements. /// </summary> /// <returns>The top most GameElement.</returns> public GameElement GetTopElement() { if (GameElements.Count > 0) { return(GameElements.First()); } else { return(null); } }
/// <summary> /// Sets all cards same face. /// </summary> /// <param name="faceUp">if set to <c>true</c> [face up].</param> public void SetAllCardsSameFace(bool faceUp) { if (GameElements.First() is Card) { foreach (Card card in GameElements) { if (card.FaceUp != faceUp) { card.Flip(); } } } }