-
Notifications
You must be signed in to change notification settings - Fork 0
/
a.patch
47 lines (45 loc) · 1.84 KB
/
a.patch
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
--- ai_src/tehai_ana.cpp 2021-02-21 04:57:52.003400800 +0800
+++ ai_src/tehai_ana.cpp 2021-02-21 03:28:15.183442500 +0800
@@ -537,7 +537,7 @@ void Tehai_Analyzer_Basic::cut_tatu(cons
tps.tatu_hai.pop_back();
tps.tatu_hai.pop_back();
}
- if(tehai_tmp[hai] && tehai_tmp[hai+1] && hai<30){
+ if(hai<30 && tehai_tmp[hai] && tehai_tmp[hai+1]){
tehai_tmp[hai]--;
tehai_tmp[hai+1]--;
tps.tatu_hai.push_back(hai);
@@ -548,7 +548,7 @@ void Tehai_Analyzer_Basic::cut_tatu(cons
tps.tatu_hai.pop_back();
tps.tatu_hai.pop_back();
}
- if(tehai_tmp[hai] && tehai_tmp[hai+2] && hai<30 && hai%10<=8){
+ if(hai<30 && hai%10<=8 && tehai_tmp[hai] && tehai_tmp[hai+2]){
tehai_tmp[hai]--;
tehai_tmp[hai+2]--;
tps.tatu_hai.push_back(hai);
--- ai_src/tehai_cal.cpp 2021-02-21 04:57:52.010398500 +0800
+++ ai_src/tehai_cal.cpp 2021-02-21 03:42:02.241330300 +0800
@@ -816,15 +816,16 @@ void Tehai_Calculator::set_candidates3_m
tehai_calculator_work.candidates_work[cn].add_kakan(kakan_cand, ts_maps[cn], tehai_calculator_work.cal_tav_work, omp_get_thread_num());
}
- int daiminkan_cand[38] = {};
- daiminkan_cand[haikind(fuuro_cand_hai)] = 1;
- #pragma omp parallel
- #pragma omp for
- for(int cn=0;cn<candidates_size();cn++) {
- tehai_calculator_work.candidates_work[cn].add_daiminkan(daiminkan_cand, ts_maps[cn], tehai_calculator_work.cal_tav_work, omp_get_thread_num());
+ if (0 <= haikind(fuuro_cand_hai) && haikind(fuuro_cand_hai) < 38) {
+ int daiminkan_cand[38] = {};
+ daiminkan_cand[haikind(fuuro_cand_hai)] = 1;
+ #pragma omp parallel
+ #pragma omp for
+ for(int cn=0;cn<candidates_size();cn++) {
+ tehai_calculator_work.candidates_work[cn].add_daiminkan(daiminkan_cand, ts_maps[cn], tehai_calculator_work.cal_tav_work, omp_get_thread_num());
+ }
}
-
- }
+ }
#pragma omp parallel
#pragma omp for