My Pokemon collection

I love Pokemon

so much that I can't be bothered to put the accent on the e.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
public static bool IsHyperTrained(this IHyperTrain t, int index)
        {
            return index switch
            {
                0 => t.HT_HP,
                1 => t.HT_ATK,
                2 => t.HT_DEF,
                3 => t.HT_SPE,
                4 => t.HT_SPA,
                5 => t.HT_SPD,
                _ => throw new ArgumentOutOfRangeException(nameof(index))
            };
        }

No comments:

Post a Comment