- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHand.cpp
More file actions
Latest commit
16 lines (13 loc) · 380 Bytes
/
Copy pathHand.cpp
File metadata and controls
16 lines (13 loc) · 380 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include"Hand.h"
#include<iostream>
usingnamespacestd;
Hand::Hand() : hand(new LinkedList()) {}
Hand::Hand(const Hand& other) { //copy constructor overload
for (int i = 0; i < getSize(); i++){
deletecardAtIndex(i);
}
delete hand;
hand = new LinkedList*();
Node* current = getHead();
for (int i = 0; i<other.getCount(); i++){
current = new