commands/index.js
/**
 * @brief This function sets up ttt command handlers.
 *
 * @return object Map containing the mapping between the ttt commands and its
 *                handlers.
 */
@brief This function sets up ttt command handlers.
@return object Map containing the mapping between the ttt commands and its
handlers.
@brief This function sets up ttt command handlers . @return object Map containing the mapping between the ttt commands and its handlers .
function initializeCommands() {
    'use strict';
    const constants = require('../lib/constants');
    let funcMap = new Map();
    funcMap.set(constants.commands.START, require("./start"));
    funcMap.set(constants.commands.PLAY, require("./play"));
    funcMap.set(constants.commands.STATUS, require("./status"));
    funcMap.set(constants.commands.HISTORY, require("./history"));
    funcMap.set(constants.commands.END, require("./end"));
    funcMap.set(constants.commands.HELP, require("./help"));
    return funcMap;
}
function initializeCommands ( ) { 'use strict' ; const constants = require ( '../lib/constants' ) ; let funcMap = new Map ( ) ; funcMap . set ( constants . commands . START , require ( "./start" ) ) ; funcMap . set ( constants . commands . PLAY , require ( "./play" ) ) ; funcMap . set ( constants . commands . STATUS , require ( "./status" ) ) ; funcMap . set ( constants . commands . HISTORY , require ( "./history" ) ) ; funcMap . set ( constants . commands . END , require ( "./end" ) ) ; funcMap . set ( constants . commands . HELP , require ( "./help" ) ) ; return funcMap ; }
@brief This function sets up ttt command handlers.
@brief This function sets up ttt command handlers .
// Access constants file // Command handler map // Populating handler map with appropriate handlers.