-
Notifications
You must be signed in to change notification settings - Fork 0
/
Board.h
76 lines (66 loc) · 2.15 KB
/
Board.h
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#pragma once
#include <SFML/Graphics.hpp>
#include "Tile.h"
#include <vector>
using namespace std;
class Board
{
vector<vector<Tile*>> topTiles;
vector<vector<Tile*>> bottomTiles;
vector<vector<Tile*>> background;
vector<vector<Tile*>> flagTiles;
vector<tuple<int, int>> bombTiles;
vector<tuple<int, int>> flagLocations;
vector<tuple<int, int>> revealedTiles;
Tile* debugButton;
Tile* Test1;
Tile* Test2;
Tile* Test3;
Tile* SmileyFace;
Tile* WinFace;
Tile* LoseFace;
int numberFlags;
int nonMineTilesRemaining;
public:
Board();
void SetTile(int x, int y, Tile* tempTile);
void AddFlag(tuple<int, int>&);
void RemoveFlag(tuple<int, int>& location);
void InitializeBoard();
void CreateBackGround();
void ResetBackground();
void RandomizeBombs();
bool checkRepeat(tuple<int, int>&, vector< tuple<int, int>>&);
void RemoveTuple(tuple<int, int>&);
void SetBombs();
int NumberBombsAdjacent(tuple<int, int>& tempLocation);
void SetNumbers();
void RevealTiles(tuple<int, int>&, vector<tuple<int, int>>&);
void RevealTilesNorth(tuple<int, int>&, vector<tuple<int, int>>&);
void RevealTilesSouth(tuple<int, int>&, vector<tuple<int, int>>&);
void RevealTilesWest(tuple<int, int>&, vector<tuple<int, int>>&);
void RevealTilesEast(tuple<int, int>&, vector<tuple<int, int>>&);
void RevealTilesNorthWest(tuple<int, int>&, vector<tuple<int, int>>&);
void RevealTilesNorthEast(tuple<int, int>&, vector<tuple<int, int>>&);
void RevealTilesSouthEast(tuple<int, int>&, vector<tuple<int, int>>&);
void RevealTilesSouthWest(tuple<int, int>&, vector<tuple<int, int>>&);
void RevealAllMines();
vector<Tile*> GetCounterTile(string);
vector<vector<Tile*>>& GetBoardTop();
vector<vector<Tile*>>& GetBoardBottom();
vector< vector<Tile*>>& GetBackground();
vector< vector<Tile*>>& GetFlags();
vector<tuple<int, int>>& GetBombTiles();
vector<tuple<int, int>>& GetFlagLocations();
vector<tuple<int, int>>& GetRevealedTileLocations();
int& GetNumberFlags();
int& GetNumberNonMines();
Tile* GetDebugButton();
Tile* GetTest1Button();
Tile* GetTest2Button();
Tile* GetTest3Button();
Tile* GetSmileyFace();
Tile* GetWinFace();
Tile* GetLoseFace();
void LoadTest(int);
};