- Array.prototype.concat.apply(
- ['w', 'b'].map(c => Object.keys(this.kingFlags[c]))
+ Array.prototype.concat.apply([],
+ ['w', 'b'].map(c => {
+ const res = Object.keys(this.kingFlags[c]).join("");
+ return (c == 'w' ? res.toUpperCase() : res);
+ })