//-----------------------------------------------------------------------------
// UIUtilty.cs
//
// Microsoft XNA Community Game Platform
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
namespace CardsFramework
{
public static class UIUtility
{
///
/// Indicates if the game is running on a mobile platform.
///
public readonly static bool IsMobile = OperatingSystem.IsAndroid() || OperatingSystem.IsIOS();
///
/// Indicates if the game is running on a desktop platform.
///
public readonly static bool IsDesktop = OperatingSystem.IsMacOS() || OperatingSystem.IsLinux() || OperatingSystem.IsWindows();
///
/// Gets the name of a card asset.
///
/// The card type for which to get the asset name.
/// The card's asset name.
public static string GetCardAssetName(TraditionalCard card)
{
return string.Format("{0}{1}",
((card.Value | CardValue.FirstJoker) ==
CardValue.FirstJoker ||
(card.Value | CardValue.SecondJoker) ==
CardValue.SecondJoker) ?
"" : card.Type.ToString(), card.Value);
}
}
}