Skip to content

Commit

Permalink
Tweak verbose output
Browse files Browse the repository at this point in the history
Group fishy with fishy, and valid with valid. Fishy checks are pulled to
the top.
  • Loading branch information
kwsch committed Apr 8, 2016
1 parent 53da8c3 commit 4fa777d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Legality/Analysis.cs
Expand Up @@ -62,7 +62,7 @@ private string getLegalityReport()
if (!pk6.Gen6)
return "Analysis only available for Pokémon that originate from X/Y & OR/AS.";

var chks = new[] { ECPID, Nickname, IVs, EVs, IDs, Encounter, Level, Ribbons, Ability, Ball, HandlerMemories };
var chks = new[] { Encounter, Level, Ball, Ability, Ribbons, ECPID, Nickname, IVs, EVs, IDs, HandlerMemories };

string r = "";
for (int i = 0; i < 4; i++)
Expand All @@ -86,8 +86,9 @@ private string getVerboseLegalityReport()
string r = getLegalityReport() + Environment.NewLine;
r += "===" + Environment.NewLine + Environment.NewLine;

var chks = new[] { ECPID, Nickname, IVs, EVs, IDs, Encounter, Level, Ribbons, Ability, Ball, HandlerMemories };
r += chks.Where(chk => chk.Valid && chk.Comment != "Valid").Aggregate("", (current, chk) => current + $"{chk.Judgement}: {chk.Comment}{Environment.NewLine}");
var chks = new[] { Encounter, Level, Ball, Ability, Ribbons, ECPID, Nickname, IVs, EVs, IDs, HandlerMemories };
r += chks.Where(chk => chk.Valid && chk.Comment != "Valid").OrderBy(chk => chk.Judgement) // Fishy sorted to top
.Aggregate("", (current, chk) => current + $"{chk.Judgement}: {chk.Comment}{Environment.NewLine}");
return r.TrimEnd();
}

Expand Down

0 comments on commit 4fa777d

Please sign in to comment.