-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStack.h
More file actions
34 lines (25 loc) · 698 Bytes
/
Stack.h
File metadata and controls
34 lines (25 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef STACK_H
#define STACK_H
#include "CardList.h"
class Stack {
private:
CardList cardList;
public:
// Default Constructor for the Stack class
Stack();
// Pushes card with name and point to the stack
void push(const std::string& name, int cost);
// Pops card from the stack if it is not empty
void pop();
// Checks if the stack is empty
bool isEmpty() const;
// Get the size of the stack
int getSize() const;
// Method to print all the cards in the stack
void printCards() const;
// Returns the top card of the stack without removing it
std::pair<std::string, int> peekCard() const;
// Destructor
~Stack();
};
#endif