-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBox.h
More file actions
39 lines (30 loc) · 644 Bytes
/
Box.h
File metadata and controls
39 lines (30 loc) · 644 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
35
36
37
38
39
#pragma once
#include <iostream>
#include "Minesweeper.h"
#include "help.h"
using namespace std;
//Values of x co-relate with columns while values of y co-relate with rows
class Box
{
private:
friend class Minesweeper;
protected:
int i;
int j;
int value;
int state; //0 state will indicate that the box is hidden, 1 will indicate that it has been revealed and 2 will indicate that it has been flagged
public:
Box()
{
i = j = state = value = 0;
}
Box(int iNew, int jNew, int val)
{
i = iNew;
j = jNew;
state = 0;
value = val;
}
friend class Easy;
virtual void Draw(int xPixelConstant, int yPixelConstant) = 0;
};