packages/warriorjs-cli/src/ui/printTowerReport.js
function printTowerReport(profile) {
  const averageGrade = profile.calculateAverageGrade();
  if (!averageGrade) {
    return;
  }

  const averageGradeLetter = getGradeLetter(averageGrade);
  printLine(`Your average grade for this tower is: ${averageGradeLetter}\n`);

  Object.keys(profile.currentEpicGrades)
    .sort()
    .forEach(levelNumber => {
      const grade = profile.currentEpicGrades[levelNumber];
      const gradeLetter = getGradeLetter(grade);
      printLine(`  Level ${levelNumber}: ${gradeLetter}`);
    });

  printLine('\nTo practice a level, use the -l option.');
}
function printTowerReport(profile) {
  const averageGrade = profile.calculateAverageGrade();
  if (!averageGrade) {
    return;
  }

  const averageGradeLetter = getGradeLetter(averageGrade);
  printLine(`Your average grade for this tower is: ${averageGradeLetter}\n`);

  Object.keys(profile.currentEpicGrades)
    .sort()
    .forEach(levelNumber => {
      const grade = profile.currentEpicGrades[levelNumber];
      const gradeLetter = getGradeLetter(grade);
      printLine(`  Level ${levelNumber}: ${gradeLetter}`);
    });

  printLine('\nTo practice a level, use the -l option.');
}
function printTowerReport ( profile ) { const averageGrade = profile . calculateAverageGrade ( ) ; if ( ! averageGrade ) { return ; } const averageGradeLetter = getGradeLetter ( averageGrade ) ; printLine ( ` ${ averageGradeLetter } \n ` ) ; Object . keys ( profile . currentEpicGrades ) . sort ( ) . forEach ( levelNumber => { const grade = profile . currentEpicGrades [ levelNumber ] ; const gradeLetter = getGradeLetter ( grade ) ; printLine ( ` ${ levelNumber } ${ gradeLetter } ` ) ; } ) ; printLine ( '\nTo practice a level, use the -l option.' ) ; }
Prints the tower report.

@param {Profile} profile The profile.
Prints the tower report .