@gamepark/rules-api
Version:
API to implement the rules of a board game
14 lines • 456 B
JavaScript
import { hasHiddenInformation } from '../HiddenInformation';
import { hasSecretInformation } from '../SecretInformation';
export function getGameView(rules, playerId) {
if (hasSecretInformation(rules) && playerId !== undefined) {
return rules.getPlayerView(playerId);
}
else if (hasHiddenInformation(rules)) {
return rules.getView();
}
else {
return rules.game;
}
}
//# sourceMappingURL=game-view.util.js.map