aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk6/lab5
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2019-04-19 09:07:14 -0500
committerRossTheRoss <msattr@gmail.com>2019-04-19 09:07:14 -0500
commit8a40fc9da5b27cad8277461e9456490d0fc622e7 (patch)
treed7a851bd091e7dd202c678123ec8276ce0c226d6 /ee1301/wk6/lab5
parentT O U C H U P S (diff)
downloadhomework-8a40fc9da5b27cad8277461e9456490d0fc622e7.tar
homework-8a40fc9da5b27cad8277461e9456490d0fc622e7.tar.gz
homework-8a40fc9da5b27cad8277461e9456490d0fc622e7.tar.bz2
homework-8a40fc9da5b27cad8277461e9456490d0fc622e7.tar.lz
homework-8a40fc9da5b27cad8277461e9456490d0fc622e7.tar.xz
homework-8a40fc9da5b27cad8277461e9456490d0fc622e7.tar.zst
homework-8a40fc9da5b27cad8277461e9456490d0fc622e7.zip
e
e
Diffstat (limited to 'ee1301/wk6/lab5')
-rw-r--r--ee1301/wk6/lab5/strap012_lab5_w_1.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/ee1301/wk6/lab5/strap012_lab5_w_1.cpp b/ee1301/wk6/lab5/strap012_lab5_w_1.cpp
index d3684fb..4020b98 100644
--- a/ee1301/wk6/lab5/strap012_lab5_w_1.cpp
+++ b/ee1301/wk6/lab5/strap012_lab5_w_1.cpp
@@ -1,10 +1,10 @@
#include <iostream>
#include <string>
-#include <time.h> //MinGW does not compile without this included when time is involved.
+#include <time.h> //MinGW refuses to compile without this included when time is involved.
class DeckOfCards {
private:
- int index=0, deck[53]; //deck is size 53 as a hack designed to prevent segfaults.
+ int index=0, deck[52];
public:
DeckOfCards();
void shuffle();
@@ -47,7 +47,7 @@ void showHand(int hand[], const int size) {
//Deck initialized with 1-52 and shuffled
DeckOfCards::DeckOfCards() {
- for(int i=0; i<52; i++) {
+ for(int i=0; i<51; i++) {
deck[i]=i+1;
}
shuffle();