Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.25 KB | None | 0 0
  1. // Test.cpp : This file contains the 'main' function. Program execution begins and ends there.
  2. //
  3.  
  4. #include "pch.h"
  5. #include "Card.h"
  6. #include "Game.h"
  7. #include <iostream>
  8.  
  9. int main()
  10. {
  11.    
  12.     Card deck[52];
  13.    
  14.     std::string cardTypes[4] = { "CLUBS", "SPADES", "DIAMONDS", "HEARTS" };
  15.  
  16.     int startIndex = 0;
  17.     for (int i = 1; i <= 4; i++) {
  18.         for (int j = startIndex; j <= 13; j++) {
  19.             deck[j].setCardValue(j);
  20.             if (j == 1) {
  21.                 startIndex = 14;
  22.             }
  23.             else {
  24.                 startIndex = 13 * i;
  25.             }
  26.         }
  27.     }
  28.  
  29.     for (int i = 0; i < 52; i++) {
  30.         std::cout << deck[i].getCardValue() << std::endl;
  31.     }
  32.  
  33.     std::cin.get();
  34. }
  35.  
  36. // Run program: Ctrl + F5 or Debug > Start Without Debugging menu
  37. // Debug program: F5 or Debug > Start Debugging menu
  38.  
  39. // Tips for Getting Started:
  40. //   1. Use the Solution Explorer window to add/manage files
  41. //   2. Use the Team Explorer window to connect to source control
  42. //   3. Use the Output window to see build output and other messages
  43. //   4. Use the Error List window to view errors
  44. //   5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
  45. //   6. In the future, to open this project again, go to File > Open > Project and select the .sln file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement