packages/warriorjs-core/src/loadLevel.js
function loadWarrior(
  { name, character, color, maxHealth, abilities, effects, position },
  floor,
  playerCode,
) {
  const warrior = new Warrior(name, character, color, maxHealth);
  loadAbilities(warrior, abilities);
  loadEffects(warrior, effects);
  warrior.playTurn = playerCode ? loadPlayer(playerCode) : () => {};
  floor.addWarrior(warrior, position);
}
function loadWarrior(
  { name, character, color, maxHealth, abilities, effects, position },
  floor,
  playerCode,
) {
  const warrior = new Warrior(name, character, color, maxHealth);
  loadAbilities(warrior, abilities);
  loadEffects(warrior, effects);
  warrior.playTurn = playerCode ? loadPlayer(playerCode) : () => {};
  floor.addWarrior(warrior, position);
}
function loadWarrior ( { name , character , color , maxHealth , abilities , effects , position } , floor , playerCode , ) { const warrior = new Warrior ( name , character , color , maxHealth ) ; loadAbilities ( warrior , abilities ) ; loadEffects ( warrior , effects ) ; warrior . playTurn = playerCode ? loadPlayer ( playerCode ) : ( ) => { } ; floor . addWarrior ( warrior , position ) ; }
Loads the warrior.

@param {Object} warriorConfig The config of the warrior.
@param {Floor} floor The floor of the level.
@param {string} [playerCode] The code of the player.
Loads the warrior .