Add move source indication to verbose output

Indicates the Valid legality of moves (level up, relearn pool, etc).
This commit is contained in:
Kaphotics
2016-04-16 11:36:01 -07:00
parent 5feb1c887b
commit 4d0ff2a197

View File

@@ -88,6 +88,17 @@ private string getVerboseLegalityReport()
{
string r = getLegalityReport() + Environment.NewLine;
r += "===" + Environment.NewLine + Environment.NewLine;
int rl = r.Length;
for (int i = 0; i < 4; i++)
if (vMoves[i].Valid)
r += $"{vMoves[i].Judgement} Move {i + 1}: {vMoves[i].Comment}" + Environment.NewLine;
for (int i = 0; i < 4; i++)
if (vRelearn[i].Valid)
r += $"{vRelearn[i].Judgement} Relearn Move {i + 1}: {vRelearn[i].Comment}" + Environment.NewLine;
if (rl != r.Length) // move info added, break for next section
r += Environment.NewLine;
var chks = Checks;
r += chks.Where(chk => chk.Valid && chk.Comment != "Valid").OrderBy(chk => chk.Judgement) // Fishy sorted to top