-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMemory.h
More file actions
50 lines (45 loc) · 1.18 KB
/
Memory.h
File metadata and controls
50 lines (45 loc) · 1.18 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
38
39
40
41
42
43
44
45
46
47
48
49
50
#pragma once
#ifndef MEMORY_H
#define MEMORY_H
#include <string>
#include <vector>
#include "Card.h"
#include "Player.h"
#include "HighScore.h"
namespace MemoryGame
{
class Memory
{
public:
Memory(int rows, int cols);
int getRows();
int getCols();
Card& getCard(int row, int col);
Player* getPlayer();
HighScore* getHighScore();
void createBoardWithCards();
bool CheckForMatch(int row1, int col1, int row2, int col2);
bool getIsStarted();
void setIsStarted(bool isStarted);
bool checkForEnd();
bool getProcessingClick();
void setProcessingClick(bool isProc);
int getFirstSelectedCardRow();
int getFirstSelectedCardCol();
void setFirstSelectedCardRow(int row);
void setFirstSelectedCardCol(int col);
int getSecondSelectedCardRow();
int getSecondSelectedCardCol();
void setSecondSelectedCardRow(int row);
void setSecondSelectedCardCol(int col);
void resetSelectedCards();
private:
Player* player;
HighScore* highScore;
std::vector<std::vector<Card>> board;
int rows, cols;
int firstSelectedCardRow, firstSelectedCardCol, secondSelectedCardRow, secondSelectedCardCol;
bool isProcessingClick, isStarted;
};
}
#endif