Created
January 21, 2015 15:53
-
-
Save TomMinor/069603304a95627a7834 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static const char* fullNameLookup[] = | |
{ | |
"TWO", | |
"THREE", | |
"FOUR", | |
"FIVE", | |
"SIX", | |
"SEVEN", | |
"EIGHT", | |
"NINE", | |
"TEN", | |
"JACK", | |
"QUEEN", | |
"KING", | |
"ACE" | |
} | |
static const char shortNameLookup[] = | |
{ | |
'2', | |
'3', | |
'4', | |
'5', | |
'6', | |
'7', | |
'8', | |
'9', | |
'T', | |
'J', | |
'Q', | |
'K', | |
'A' | |
} | |
if(_rank < (int)Rank::ACE) | |
{ | |
strcpy(m_rank, fullNameLookup[_rank - 1]); | |
lcd.setCursor(m_x+1,m_y); | |
lcd.print(shortNameLookup[_rank - 1]); | |
} | |
else | |
{ | |
lcd.clear(); | |
lcd.print("No valid rank."); | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment