fix: utilGame format에서 한단계 다르게 차이나는 버그 수정

This commit is contained in:
Hide_D committed 2022-08-21 18:53:55 +09:00
1 parent 78a9641c14
commit a5e481af96
5 files changed
+182 -23

No files matched your search

+1 -2
View File
@@ -1,5 +1,4 @@
import bs from 'binary-search';
import { clamp } from 'lodash-es';
const defenceMap: [number,string][] = [
[0, "△"],
@@ -14,6 +13,6 @@ export function formatDefenceTrain(defenceTrain: number): string {
if(idx >= 0){
return defenceMap[idx][1]??'?';
}
const uidx = clamp(-idx - 1, 0, defenceMap.length - 1);
const uidx = (~idx) - 1;
return defenceMap[uidx][1]??'?';
}