心愿, 优化
parent
58337cc318
commit
35723bfbef
|
@ -410,12 +410,12 @@ public class HeroLogic{
|
||||||
|
|
||||||
// 计算权重map
|
// 计算权重map
|
||||||
HashMap<Integer, Integer> map = new HashMap<>(4);
|
HashMap<Integer, Integer> map = new HashMap<>(4);
|
||||||
for (int i = 0; i < cardInfoMap.size(); i++) {
|
for (Integer key : cardInfoMap.keySet()) {
|
||||||
if (cardInfoMap.get(i+1).getStatus() == 1){
|
if (cardInfoMap.get(key).getStatus() == 1){
|
||||||
// 已经抽中得格子去除
|
// 已经抽中得格子去除
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
map.put(i+1,value);
|
map.put(key,value);
|
||||||
}
|
}
|
||||||
int sum = map.values().stream().mapToInt(Integer::intValue).sum();
|
int sum = map.values().stream().mapToInt(Integer::intValue).sum();
|
||||||
// 这里添加得是空格子, key随便填,只要不和之前重复既可. 目前用的总权重数负值当key
|
// 这里添加得是空格子, key随便填,只要不和之前重复既可. 目前用的总权重数负值当key
|
||||||
|
|
Loading…
Reference in New Issue