UNPKG

@gameye/sdk

Version:
19 lines 602 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Selects all locations for a given game. * @param gameState game state * @param gameKey identifier of the game */ function selectLocationListForGame(gameState, gameKey) { const gameItem = gameState.game[gameKey]; if (!gameItem) return []; return Object.entries(gameItem.location). filter(([, hasLocation]) => hasLocation). map(([locationKey]) => ({ locationKey, })); } exports.selectLocationListForGame = selectLocationListForGame; //# sourceMappingURL=location.js.map