UNPKG

@gameye/sdk

Version:
16 lines 469 B
/** * Selects all locations for a given game. * @param gameState game state * @param gameKey identifier of the game */ export function selectLocationListForGame(gameState, gameKey) { const gameItem = gameState.game[gameKey]; if (!gameItem) return []; return Object.entries(gameItem.location). filter(([, hasLocation]) => hasLocation). map(([locationKey]) => ({ locationKey, })); } //# sourceMappingURL=location.js.map