-
Notifications
You must be signed in to change notification settings - Fork 0
/
gssp.h
61 lines (51 loc) · 930 Bytes
/
gssp.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
#pragma once
#include<iostream>
#include<vector>
#define MXH 6
#define MXL 6
typedef int Pos;
typedef int WTNum;
typedef int ScoreN;
typedef long int ScoreLN;
class AIn {
friend class Fun;
private:
WTNum water;
Pos p_l, p_h;
//vector< vector<int > > arr;
ScoreN Plus;
ScoreLN sumSc;
static AIn* m_pInstance;
AIn() = delete;
//AIn(int x) :arr(MXH) {};
void static createAIn(AIn* p);
public:
static AIn* GetInstance();
bool setPos();
Pos getPosX();
Pos getPosY();
void getArrSizeAndScr();
//输出
void dispArr();
bool AddArrN(Pos x, Pos y);
bool setPlusZ();
bool SumPlus();
ScoreN getPlus();
WTNum getWater();
bool setWater(int m);
bool setPos(Pos l, Pos h);
~AIn() {
if (m_pInstance)
delete m_pInstance;
m_pInstance = nullptr;
}
};
class Fun {
public:
Fun() = default;
void firstSetMap();
void Tvs(Pos x, Pos y);
public:
//判断全局是否需要重新生成
bool isGameOver(AIn* p);
};