mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-23 03:46:28 -05:00
15 lines
357 B
TypeScript
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;
|
|
}
|