File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -120,19 +120,22 @@ class HalfKAv2_hm {
120120 for (uint8_t knight = 0 ; knight <= 2 ; ++knight)
121121 for (uint8_t cannon = 0 ; cannon <= 2 ; ++cannon)
122122 v[rook][knight][cannon] = [&] {
123- if (rook != 0 )
124- if (knight > 0 && cannon > 0 )
125- return 0 ;
126- else if (rook == 2 || knight + cannon > 1 )
123+ if (cannon == 2 ) // 桶0: 双炮威胁
124+ return 0 ;
125+ if (cannon == 1 ) {
126+ if (rook > 0 ) // 桶1: 车炮组合
127127 return 1 ;
128- else
128+ if (knight > 0 ) // 桶2: 马炮组合
129129 return 2 ;
130- else if (knight > 0 && cannon > 0 )
130+ }
131+ // 以下是无炮或只有单炮但无配合的情况
132+ if (rook == 2 ) // 桶3: 双车威力
131133 return 3 ;
132- else if (knight + cannon > 1 )
134+ if (rook == 1 && knight > 0 ) // 桶4: 车马组合
133135 return 4 ;
134- else
135- return 5 ;
136+
137+ // 桶5: 其他所有残子局面
138+ return 5 ;
136139 }();
137140 return v;
138141 }();
You can’t perform that action at this time.
0 commit comments