push
0 of 13 new or added lines in 3 files covered. (0.0%)
34 existing lines in 3 files now uncovered.0 of 91 relevant lines covered (0.0%)
0.0 hits per line
1 |
package com.doppelganger9.mastermind; |
|
2 |
|
|
3 |
import lombok.AccessLevel; |
|
4 |
import lombok.Getter; |
|
5 |
import lombok.RequiredArgsConstructor; |
|
6 |
|
|
7 |
/**
|
|
8 |
* Possible Color choices in the game. |
|
9 |
*/ |
|
NEW
|
@Getter
|
× |
NEW
|
@RequiredArgsConstructor(access = AccessLevel.PACKAGE)
|
× |
12 |
enum ColorEnum {
|
|
UNCOV
13
|
R ("Red"),
|
× |
UNCOV
14
|
J ("Yellow"),
|
× |
UNCOV
15
|
B("Blue"),
|
× |
UNCOV
16
|
O("Orange"),
|
× |
UNCOV
17
|
V("Green"),
|
× |
UNCOV
18
|
N("Black");
|
× |
19 |
|
|
NEW
|
private final String label; |
× |
21 |
|
|
22 |
static ColorEnum fromLabel(String label) { |
|
UNCOV
23
|
for(ColorEnum c : ColorEnum.values()) {
|
× |
UNCOV
24
|
if (c.getLabel().equals(label)) {
|
× |
UNCOV
25
|
return c;
|
× |
26 |
} |
|
27 |
} |
|
UNCOV
28
|
return null; |
× |
29 |
} |
|
30 |
} |