Step 1: loadSave(text) parses the JSON text inside a try...catch and returns the resulting object, or null if the text is invalid.
Step 2: printReport(text) loads the save with loadSave. If the result is null, it prints "Corrupted save file" and stops. Otherwise it prints the header "=== Sam's Codédex (5 badges) ===" using the trainer's name and badges.
Step 3: for each team member, print one line: the name padded to 10 characters, then "Lv.X" padded to 6, then "hp/maxHp". Add " FAINTED" at the end when the hp is 0.
Step 4: then print three stats lines:
- "Ready to fight: N/M" — members with hp above 0, out of the team size
- "Average level: X" — computed with reduce
- "Unique moves: N" — the number of different moves across the whole team (use a Set)
Step 5: call printReport(saveFile), then printReport(brokenFile).