Simplify move suggestion method

Relying on linq... so rich.

Take the suggested moves, select a string array, and join.
This commit is contained in:
Kaphotics 2016-04-07 17:42:53 -07:00
parent 844e24024b
commit 1eff57bd87

View file

@ -1456,11 +1456,7 @@ namespace PKHeX
{
updateLegality();
int[] m = Legality.getSuggestedRelearn();
string[] s = new string[4];
for (int i = 0; i < 4; i++)
s[i] = movelist[m[i]];
string r = string.Join(Environment.NewLine, s);
string r = string.Join(Environment.NewLine, m.Select(v => v >= movelist.Length ? "ERROR" : movelist[v]));
if (DialogResult.Yes != Util.Prompt(MessageBoxButtons.YesNo, "Apply suggested relearn moves?", r))
return;