-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMinesweeper.h
More file actions
37 lines (31 loc) · 796 Bytes
/
CMinesweeper.h
File metadata and controls
37 lines (31 loc) · 796 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
#pragma once
#include "utils.h"
#include "SVector2D.h"
#include "CParams.h"
class CMinesweeper
{
protected:
//the number of Mines gathered by the sweeper
double m_dMinesGathered;
//the scale of the sweeper when drawn
double m_dScale;
//index position of closest mine
int m_iClosestMine;
int m_iClosestRock;
int m_iClosestSupermine;
bool m_bDead;
public:
CMinesweeper(void):m_dMinesGathered(0),
m_dScale(CParams::iSweeperScale),
m_iClosestMine(0),
m_bDead(false){}
virtual ~CMinesweeper(void);
void IncrementMinesGathered(){++m_dMinesGathered;}
double MinesGathered()const{return m_dMinesGathered;}
void Reset();
void die();
bool isDead() const;
int getClosestMine();
int getClosestRock();
int getClosestSupermine();
};