kraft
Version:
A mysterious command line game with lots of secrets
12 lines (10 loc) • 640 B
JavaScript
/**
* Created by vanraar on 23/09/16.
*/
const Locations = require(__base+'model/data/Locations');
exports.buildings = (buildings) => R.keys(buildings).join(', ') || 'nothing yet!';
exports.locations = (locations) => R.keys(locations).filter((location) => !Locations[location].secret).join('\n ');
exports.resources = (resources) => R.keys(resources)
.filter((resource) => !!resources[resource])
.map((resource) => resource+': '+(resources[resource] || 0).toString().green).join('\n ');
exports.resourcesWithoutValues = (resources) => R.keys(resources).join(', ');