-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
140 lines (121 loc) · 3.57 KB
/
main.cpp
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#include <cstring>
#include <string>
#include <vector>
#include <GenshinGachaSimulation\GachaSimulationRec.h>
using namespace std;
/*
for(int i = 0;i < totalSimulationAmount;i ++)
{
for(;;)
{
GachaFallBack fallBackOnce = thisGachaSystem.doGacha(simPlayerData);
// do Gacha and get fallback
simPlayerData.updateData(fallBackOnce);
// refresh player data
for(int j = 0;j < totalTaticAmount;j ++)
{
if(TaticList[j].judgeCondition(simPlayerData)) simPlayerData.updateData(TaticList[j].TaticFallBack());
//reset player data by the Tatic
}
if(EndSitiuationJudge(simPlayerData)) break;
// if target was completed
}
simRec.AddData(simPlayerData);
// record and do caculate
}
*/
class Command
{
/*
* command set
* doSimulation [times]
*
* setTarget [TargetAmount] {[itemName] [amount]}…x"amount" times
*
* setBanner [5Up1Name] [5Up2Name] [5Arm1Name] [5Arm2Name]
*
* setTatic [firstBanner] [TaticAmount] {[Tragger] [traggerValue] [Factor] [factorValue] [modifyType] [modifyValue]}…"amount" times
*
*/
// Prmt-parameter
public:
int ID;
struct setTargetPrmt
{
string itemName;
int amount;
};
struct setBannerStu
{
string Up1Name,
Up2Name,
Arm1Name,
Arm2Name;
};
struct setTatic
{
int TraggerID,
traggerValue,
FactorID,
factorValue,
modifyTypeID,
modifyValue;
}
Command Command(string cmdInput) //对输入字符串进行处理,存入以上指令数据集
{
}
}
int main()
{
//initialization simulation data
PlayerData simPlayerData = new PlayerData();
GachaSystem thisGachaSystem = new GachaSystem();
GachaSimulationRec simRec = new GachaSimulationRec();
vector<GachaTatic> TaticList;
//input tatic
int totalSimulationTimes,totalTaticAmount;
//begin command recall
for(;;){ //Main
string commandString;
cin >> commandString; //input command
Command thiscommand = new Command(commandString); //initialization class commond and process commond
switch(thiscommand.GetPrvcommandID()){ //apply commond
case 0:{
for(int i = 0;i < totalSimulationTimes;i ++)
{
for(;;)
{
GachaFallBack fallBackOnce = thisGachaSystem.doGacha(simPlayerData);
// do Gacha and get fallback
simPlayerData.updateData(fallBackOnce);
if(simPlayerData.EndSitiuationJudge()) break;
// refresh player data
for(int j = 0;j < totalTaticAmount;j ++)
{
if(TaticList[j].judgeCondition(simPlayerData)) simPlayerData.updateData(TaticList[j].TaticFallBack());
//reset player data by the Tatic
}
// if target was completed
}
simRec.AddData(simPlayerData);
// record and do caculate
}
};break;
case 1:{
};break;
case 2:{
};break;
case 3:{
};break;
case 4:{
};break;
case 5:{
};break;
case 6:{
};break;
}
}
//count record and produce ans
// simRec.output();
return 0;
}