UIUtilty.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #region File Description
  2. //-----------------------------------------------------------------------------
  3. // UIUtilty.cs
  4. //
  5. // Microsoft XNA Community Game Platform
  6. // Copyright (C) Microsoft Corporation. All rights reserved.
  7. //-----------------------------------------------------------------------------
  8. #endregion
  9. #region Using Statements
  10. using System;
  11. using System.Collections.Generic;
  12. using System.Text;
  13. #endregion
  14. namespace CardsFramework
  15. {
  16. public static class UIUtilty
  17. {
  18. /// <summary>
  19. /// Gets the name of a card asset.
  20. /// </summary>
  21. /// <param name="card">The card type for which to get the asset name.</param>
  22. /// <returns>The card's asset name.</returns>
  23. public static string GetCardAssetName(TraditionalCard card)
  24. {
  25. return string.Format("{0}{1}",
  26. ((card.Value | CardValue.FirstJoker) ==
  27. CardValue.FirstJoker ||
  28. (card.Value | CardValue.SecondJoker) ==
  29. CardValue.SecondJoker) ?
  30. "" : card.Type.ToString(), card.Value);
  31. }
  32. }
  33. }