server/engine/gameLogic/Map.js
/**
 * helper function
 * @param data (a object that specify map data) for mapHexTypeData, mapTokenData and harborTypeData
 * @returns {Array} string array
 */
helper function
@param data (a object that specify map data) for mapHexTypeData, mapTokenData and harborTypeData
@returns {Array} string array
helper function @param data ( a object that specify map data ) for mapHexTypeData mapTokenData and harborTypeData @returns { Array } string array
function readMapInputToGenStrList(data) {
    let keys = Object.keys(data);
    let result = [];
    for (let key of keys){
        let cnt = data[key];
        for (let i = 0; i<cnt; i++){
            result.push(key);
        }
    }
    return result;
}
function readMapInputToGenStrList ( data ) { let keys = Object . keys ( data ) ; let result = [ ] ; for ( let key of keys ) { let cnt = data [ key ] ; for ( let i = 0 ; i < cnt ; i ++ ) { result . push ( key ) ; } } return result ; }
helper function
 @param data (a object that specify map data) for mapHexTypeData, mapTokenData and harborTypeData
 @returns {Array} string array
helper function @param data ( a object that specify map data ) for mapHexTypeData mapTokenData and harborTypeData @returns { Array } string array