Advertisement
BeamNG_IRC

Untitled

Aug 16th, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.20 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. // functions
  4.  
  5. void listCards();
  6.  
  7. // cards array
  8.  
  9. char *Spades[13] = {
  10.  
  11. "🂡", "🂢",
  12. "🂣", "🂤",
  13. "🂥", "🂦",
  14. "🂧", "🂨",
  15. "🂩", "🂪",
  16. "🂫", "🂭",
  17. "🂮",
  18.  
  19. };
  20.  
  21. char *Hearts[13] = {
  22.  
  23.     "🂱", "🂲",
  24.     "🂳", "🂴",
  25.     "🂵", "🂶",
  26.     "🂷", "🂸",
  27.     "🂹", "🂺",
  28.     "🂻", "🂽",
  29.     "🂾"
  30.  
  31.     };
  32.  
  33. char *Diamonds[13] = {
  34.  
  35.     "🃁", "🃂",
  36.     "🃃", "🃄",
  37.     "🃅", "🃆",
  38.     "🃇", "🃈",
  39.     "🃉", "🃊",
  40.     "🃋", "🃍",
  41.     "🃎",
  42.  
  43. };
  44.  
  45. char *Clubs[13] = {
  46.  
  47.     "🃑", "🃒",
  48.     "🃓", "🃔",
  49.     "🃕", "🃖",
  50.     "🃗", "🃘",
  51.     "🃙", "🃚",
  52.     "🃛", "🃝",
  53.     "🃞",
  54.  
  55. };
  56.  
  57. int main (int argc, char **argv) {
  58.  
  59.     if (argc < 2) {
  60.  
  61.         printf("This program will generate a field of cards.\nusage: TBA\n");
  62.         return 0;
  63.  
  64.     }
  65.  
  66.     if (strcmp(argv[1], "list") == 0) {
  67.  
  68.         listCards();
  69.  
  70.     }
  71.  
  72.     return 0;
  73.  
  74. }
  75.  
  76. void listCards() {
  77.  
  78.     int x = 0;
  79.     for (x; x < 13; x++) {
  80.  
  81.         printf("%s", Spades[x]);
  82.         printf("%s", Hearts[x]);
  83.         printf("%s", Diamonds[x]);
  84.         printf("%s\n", Clubs[x]);
  85.  
  86.     }
  87.  
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement