packages/warriorjs-core/src/loadLevel.js
function loadUnit(
  {
    name,
    character,
    color,
    maxHealth,
    reward,
    enemy,
    bound,
    abilities,
    effects,
    playTurn,
    position,
  },
  floor,
) {
  const unit = new Unit(
    name,
    character,
    color,
    maxHealth,
    reward,
    enemy,
    bound,
  );
  loadAbilities(unit, abilities);
  loadEffects(unit, effects);
  unit.playTurn = playTurn;
  floor.addUnit(unit, position);
}
function loadUnit(
  {
    name,
    character,
    color,
    maxHealth,
    reward,
    enemy,
    bound,
    abilities,
    effects,
    playTurn,
    position,
  },
  floor,
) {
  const unit = new Unit(
    name,
    character,
    color,
    maxHealth,
    reward,
    enemy,
    bound,
  );
  loadAbilities(unit, abilities);
  loadEffects(unit, effects);
  unit.playTurn = playTurn;
  floor.addUnit(unit, position);
}
function loadUnit ( { name , character , color , maxHealth , reward , enemy , bound , abilities , effects , playTurn , position , } , floor , ) { const unit = new Unit ( name , character , color , maxHealth , reward , enemy , bound , ) ; loadAbilities ( unit , abilities ) ; loadEffects ( unit , effects ) ; unit . playTurn = playTurn ; floor . addUnit ( unit , position ) ; }
Loads a unit.

@param {Object} unitConfig The config of the unit.
@param {Floor} floor The floor of the level.
Loads a unit .