sendou.ink/app/modules/map-list-generator/utils.ts
2022-10-09 00:58:19 +03:00

15 lines
357 B
TypeScript

import type { ModeShort } from "../in-game-lists";
import type { MapPool } from "../map-pool-serializer";
export function mapPoolToNonEmptyModes(mapPool: MapPool) {
const result: ModeShort[] = [];
for (const [key, stages] of Object.entries(mapPool)) {
if (stages.length === 0) continue;
result.push(key as ModeShort);
}
return result;
}