-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbase.h
86 lines (73 loc) · 2.03 KB
/
base.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
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef BASE_H
#define BASE_H
#include <QDebug>
/*-----------------------parameter set----------------------------*/
/*--------------------------game logic----------------------------*/
enum Game_Flag {
init_flag = -1
};
enum Game_Mode {
PVE,
PVP
};
enum Game_Player_Type {
No_Player,
AI_Player,
H1_Player,
H2_Player,
Border,
Type_num
};
/*--------------------------game logic----------------------------*/
/*------------------------------ui--------------------------------*/
enum Window_SIZE {
Window_Width = 790,
Window_Height = (int)(Window_Width * 1.082)
};
enum Chess_Piece_SIZE {
Chess_Piece_Radius = 14
};
enum Grid_SIZE {
Grid_Width = 40,
Grid_num = 15,
Mark_Radius = 2,
Detect_Radius = Grid_Width / 2 - 2
};
enum Board_SIZE {
Board_Width = (Grid_num - 1) * Grid_Width,
Board_start_X = (Window_Width - Board_Width) / 2,
Board_end_X = Board_start_X + Board_Width,
Board_start_Y = Board_start_X,
Board_end_Y = Board_end_X
};
enum Button_Menu {
Min_Button,
Close_Button,
Button_Menu_num
};
enum Button_Ctrl {
New_Button,
Mode_Button,
Change_Button,
Retract_Button,
Button_Ctrl_num
};
enum Button_Ctrl_Pos {
Button_Ctrl_Width = 90,
Button_Ctrl_Height = 36,
Button_Ctrl_start_X = Board_start_X + Button_Ctrl_Height / 4 + 3,
Button_Ctrl_end_X = Board_end_X - Button_Ctrl_Width - Button_Ctrl_Height / 4 - 3,
Button_Ctrl_start_Y = Board_end_Y + Button_Ctrl_Height * 6/5,
Button_Ctrl_D = (Button_Ctrl_end_X - Button_Ctrl_start_X) / (Button_Ctrl_num - 1)
};
enum Button_Menu_Pos {
Button_Menu_Width = 50,
Button_Menu_Height = 30,
Button_Menu_D = 52,
Button_Menu_start_X = Window_Width - Button_Menu_num * (int)(Button_Menu_D * 1.15),
Button_Menu_start_Y = Button_Menu_Height / 4,
Button_Menu_end_Y = Button_Menu_Height + Button_Menu_start_Y
};
/*------------------------------ui--------------------------------*/
/*-----------------------parameter set----------------------------*/
#endif // BASE_H