@warriorjs/cli
Version:
WarriorJS command line
30 lines (22 loc) • 855 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
var _chalk = require('chalk');
var _chalk2 = _interopRequireDefault(_chalk);
var _printRow = require('./printRow');
var _printRow2 = _interopRequireDefault(_printRow);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Prints the warrior status line.
*
* @param {Object} warriorStatus The status of the warrior.
* @param {number} warriorStatus.health The health of the warrior.
* @param {number} warriorStatus.score The score of the warrior.
*/
function printWarriorStatus({ health, score }) {
(0, _printRow2.default)(_chalk2.default.redBright(`♥ ${health}`));
(0, _printRow2.default)(_chalk2.default.yellowBright(`♦ ${score}`));
}
exports.default = printWarriorStatus;
module.exports = exports.default;
;