001    /**
002     * 
003     */
004    package jagafa.naming;
005    
006    import jagafa.object.Card;
007    
008    /**
009     * CardNames is a utility class for constructing user-friendly readable 
010     * string-representations of cards
011     */
012    public abstract class CardNames {
013    
014            /**
015             * Get a user-friendly name of the card
016             * @param c The card
017             * @return A string containing the color and value name of the card
018             */
019            public static String getName(Card c){
020                    if (c == null){
021                            return null;
022                    }
023                    int color = c.getColor();
024                    int value = c.getValue();
025                    
026                    String colorName = ESwissColorNames.getName(color);
027                    String valueName = ESwissValueNames.getName(value);
028                    
029            
030                    return colorName.toUpperCase() +""+ valueName.toUpperCase();    
031            }
032            
033    }