-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameMode.h
More file actions
36 lines (31 loc) · 915 Bytes
/
Copy pathGameMode.h
File metadata and controls
36 lines (31 loc) · 915 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
/*
This class is base class for CLocalGameMode, CSetPositionMode, CMenuMode, CRunGameMode.
It describes and initializes all buttons for all classes.
int flagCoverButton - shaws which button is covered by a mouse. -1 - the buttons aren't covered by mouse
*/
#pragma once
#include "source.h"
class CGameMode
{
sButton localGame;
sButton netGame;
sButton exitGame;
sButton newGame;
sButton setPosition;
sButton returnMenu;
sButton helpGame;
sButton startGame;
sButton surrender;
sButton finish;
sButton cleanPosition;
int flagCoverButton; // It is an index in the vector of buttons. It shows which button is covered a cursor of the mouse
private:
void _initButtons();
public:
CGameMode();
~CGameMode();
//--------------------set and get--------------------------//
const sButton &getButton(eButton aButton)const;
const int &getFlagCoverButton()const;
void setCoverButton(int aX, int aY);
};