kolmafia / kolmafia

@@ -19,20 +19,20 @@
Loading
19 19
  public static final int VIGOR = 3;
20 20
  public static final int BUFF = 4;
21 21
22 -
  public static final Object[][] PRAYER =
23 -
      new Object[][] {
24 -
        {"protection", "barrel lid", PROTECTION},
25 -
        {"glamour", "barrel hoop earring", GLAMOUR},
26 -
        {"vigor", "bankruptcy barrel", VIGOR},
27 -
        {"buff", "class buff", BUFF},
22 +
  private record Prayer(String name, String reward, int id) {}
23 +
24 +
  public static final Prayer[] PRAYER =
25 +
      new Prayer[] {
26 +
        new Prayer("protection", "barrel lid", PROTECTION),
27 +
        new Prayer("glamour", "barrel hoop earring", GLAMOUR),
28 +
        new Prayer("vigor", "bankruptcy barrel", VIGOR),
29 +
        new Prayer("buff", "class buff", BUFF),
28 30
      };
29 31
30 32
  public static final int findPrayer(final String name) {
31 -
    for (int i = 0; i < PRAYER.length; ++i) {
32 -
      if (name.equalsIgnoreCase((String) PRAYER[i][0])
33 -
          || name.equalsIgnoreCase((String) PRAYER[i][1])) {
34 -
        Integer index = (Integer) PRAYER[i][2];
35 -
        return index.intValue();
33 +
    for (Prayer prayer : PRAYER) {
34 +
      if (name.equalsIgnoreCase(prayer.name) || name.equalsIgnoreCase(prayer.reward)) {
35 +
        return prayer.id;
36 36
      }
37 37
    }
38 38
Files Complexity Coverage
src/net/sourceforge/kolmafia 20.30% 25.42%
Project Totals (1019 files) 20.30% 25.42%
coverage-macos-latest-java-17
Build #2531490861 -
JAVA=17
OS=macos-latest
coverage-ubuntu-latest-java-17
Build #2531490861 -
JAVA=17
OS=ubuntu-latest
coverage-windows-latest-java-17
Build #2531490861 -
JAVA=17
OS=windows-latest

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading