MCPcopy Create free account
hub / github.com/Card-Forge/forge / GameLogVerbosity

Enum GameLogVerbosity

forge-game/src/main/java/forge/game/GameLogVerbosity.java:6–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4import java.util.Set;
5
6public enum GameLogVerbosity {
7 LOW("Low",
8 EnumSet.of(GameLogEntryType.GAME_OUTCOME, GameLogEntryType.MATCH_RESULTS,
9 GameLogEntryType.TURN, GameLogEntryType.MULLIGAN,
10 GameLogEntryType.ANTE, GameLogEntryType.DAMAGE)),
11 MEDIUM("Medium",
12 EnumSet.of(GameLogEntryType.GAME_OUTCOME, GameLogEntryType.MATCH_RESULTS,
13 GameLogEntryType.TURN, GameLogEntryType.MULLIGAN,
14 GameLogEntryType.ANTE, GameLogEntryType.DAMAGE,
15 GameLogEntryType.ZONE_CHANGE, GameLogEntryType.LAND,
16 GameLogEntryType.DISCARD, GameLogEntryType.COMBAT,
17 GameLogEntryType.STACK_ADD, GameLogEntryType.STACK_RESOLVE,
18 GameLogEntryType.LIFE)),
19 HIGH("High",
20 EnumSet.allOf(GameLogEntryType.class)),
21 CUSTOM("Custom",
22 EnumSet.noneOf(GameLogEntryType.class));
23
24 private final String caption;
25 private final Set<GameLogEntryType> includedTypes;
26
27 GameLogVerbosity(String caption, Set<GameLogEntryType> includedTypes) {
28 this.caption = caption;
29 this.includedTypes = includedTypes;
30 }
31
32 public Set<GameLogEntryType> getIncludedTypes() {
33 return includedTypes;
34 }
35
36 /** Parse from either enum name ("HIGH") or caption ("High"). */
37 public static GameLogVerbosity fromString(String value) {
38 for (GameLogVerbosity v : values()) {
39 if (v.name().equalsIgnoreCase(value) || v.caption.equals(value)) {
40 return v;
41 }
42 }
43 return MEDIUM; // safe fallback
44 }
45
46 @Override
47 public String toString() {
48 return caption;
49 }
50}

Callers

nothing calls this directly

Calls 1

ofMethod · 0.80

Tested by

no test coverage detected