1
2
3
4
5
6
7 package net.curre.prefcount.gui.type;
8
9 import static net.curre.prefcount.gui.type.Place.EAST;
10 import static net.curre.prefcount.gui.type.Place.NORTH;
11 import static net.curre.prefcount.gui.type.Place.SOUTH;
12 import static net.curre.prefcount.gui.type.Place.WEST;
13
14
15
16
17
18
19
20
21
22 public enum ScoreItem {
23
24
25 PLAYER_NAME(null, "pref.scoreboard.tooltip.player", false),
26
27
28 PLAYER_MOUNT(null, "pref.scoreboard.tooltip.mount", false),
29
30
31 PLAYER_NEW_MOUNT(null, "pref.scoreboard.tooltip.newMount", false),
32
33
34 PLAYER_AMNIST_MOUNT(null, "pref.scoreboard.tooltip.amnistMount", false),
35
36
37 PLAYER_FIXED_MOUNT(null, "pref.scoreboard.tooltip.mountFixed", false),
38
39
40 PLAYER_POOL(null, "pref.scoreboard.tooltip.pool", false),
41
42
43 PLAYER_POOL_CLOSED(null, "pref.scoreboard.tooltip.poolClosed", false),
44
45
46 WHIST_NORTH(NORTH, "pref.scoreboard.tooltip.whist", true),
47
48
49 WHIST_EAST(EAST, "pref.scoreboard.tooltip.whist", true),
50
51
52 WHIST_SOUTH(SOUTH, "pref.scoreboard.tooltip.whist", true),
53
54
55 WHIST_WEST(WEST, "pref.scoreboard.tooltip.whist", true),
56
57
58 WHIST_FIX_NORTH(NORTH, "pref.scoreboard.tooltip.whistFix", true),
59
60
61 WHIST_FIX_EAST(EAST, "pref.scoreboard.tooltip.whistFix", true),
62
63
64 WHIST_FIX_SOUTH(SOUTH, "pref.scoreboard.tooltip.whistFix", true),
65
66
67 WHIST_FIX_WEST(WEST, "pref.scoreboard.tooltip.whistFix", true),
68
69
70 WHIST_NORTH_SALDO(NORTH, "pref.scoreboard.tooltip.whistSaldo", true),
71
72
73 WHIST_EAST_SALDO(EAST, "pref.scoreboard.tooltip.whistSaldo", true),
74
75
76 WHIST_SOUTH_SALDO(SOUTH, "pref.scoreboard.tooltip.whistSaldo", true),
77
78
79 WHIST_WEST_SALDO(WEST, "pref.scoreboard.tooltip.whistSaldo", true),
80
81
82 WHIST_SALDO_TOTAL(null, "pref.scoreboard.tooltip.whistSaldoAll", false),
83
84
85 FINAL_MOUNT(null, "pref.scoreboard.tooltip.finalMount", false),
86
87
88 FINAL_SCORE(null, "pref.scoreboard.tooltip.finalScore", false);
89
90
91
92
93
94 public final Place place;
95
96
97 public final String key;
98
99
100
101
102
103
104
105 public final boolean isOtherPlace;
106
107
108
109
110
111
112
113
114 ScoreItem(Place place, String key, boolean isOtherPlace) {
115 this.place = place;
116 this.key = key;
117 this.isOtherPlace = isOtherPlace;
118 }
119
120
121
122
123
124
125
126
127 public static ScoreItem getWhistFixForWhist(Place whist) {
128 switch (whist) {
129 case EAST:
130 return WHIST_FIX_EAST;
131
132 case SOUTH:
133 return WHIST_FIX_SOUTH;
134
135 case WEST:
136 return WHIST_FIX_WEST;
137
138 case NORTH:
139 return WHIST_FIX_NORTH;
140
141 default:
142 throw new IllegalArgumentException("Unable to determine whist fix item for place: " + whist + "!");
143 }
144 }
145
146 }