-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPile.h
More file actions
37 lines (33 loc) · 1.11 KB
/
Pile.h
File metadata and controls
37 lines (33 loc) · 1.11 KB
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
35
36
37
#ifndef ASSIGNMENT1_PILE_H
#define ASSIGNMENT1_PILE_H
#include <iostream>
#include "Foundation.h"
#include "FileOperation.h"
using namespace std;
class Card {
public:
string cardName = "";
bool ifExist = false;
bool ifClosed = true;
};
class Pile{
public:
const int piles = 7;
const int pileCards = 19;
string cards[52];
Card pile[19][7];
Card *(*(pPile));
void createPile(string deckFile);
bool movePile(int pileNum, int cardNum, int newPileNum);
bool openPile(int pileNum);
bool moveToFoundation(int pileNum, Foundation* foundation);
bool moveFoundationToPile(int foundationNum, int pileNum, Foundation *foundation);
void printPile(ofstream* output);
void addCard(string newCard, int destination, int destinationIndex);
void removeCard(int pileNum, int cardNum);
int findCard(int pileNum);
bool checkMove(string cardName, string matchedCard);
bool checkRow(int rowNum);
bool checkColm(int colNum);
};
#endif //ASSIGNMENT1_PILE_H