-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.h
More file actions
32 lines (29 loc) · 833 Bytes
/
Game.h
File metadata and controls
32 lines (29 loc) · 833 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
#pragma once
#include "board.h"
//#define windowWidth _LeftMargin+(_SquareWidth*_Board.SquareRowCount)
//#define windowHeight 500
class CGame
{
public:
CGame(void);
~CGame(void);
void PaintBoard(HDC hdc, HWND hWnd);
void OnLeftClick(int xpos, int ypos);
void OnRightClick(int xpos, int ypos);
bool IsHintMode;
private:
CBoard _Board;
int _LeftMargin;
int _TopMargin;
void PaintSquareBorder(HDC hdc, RECT& rect, CSquare& square);
void PaintNumberSquare(HDC hdc, RECT& rect, CSquare& square);
void PaintHiddenSquare(HDC hdc, RECT& rect, CSquare& square);
void PaintMineSquare(HDC hdc, RECT& rect, CSquare& square);
void PaintFlaggedSquare(HDC hdc, RECT& rect, CSquare& square);
int _SquareWidth;
public:
void Reset();
void SetBoardSize(int rowCount, int colCount);
int GetWindowWidth();
int GetWindowHeight();
};