Skip to content

Commit

Permalink
✨ Feat : palette 삭제 및 basic 컬러로 통합
Browse files Browse the repository at this point in the history
<footer>
- 관련: #294
  • Loading branch information
joowojr committed Sep 18, 2024
1 parent 2463c9e commit 6580689
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
@Service
@RequiredArgsConstructor
public class GuestManageService {
private static final long[] PALETTE_IDS = PaletteEnum.getPaletteColorIds();
private static final long[] PALETTE_IDS = PaletteEnum.getBasicColorIds();
private final AnonymousService anonymousService;
private final ParticipantService participantService;
private final ParticipantMaker participantMaker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,27 @@
public enum PaletteEnum {
BASIC(ColorCategory.BASIC,
new ColorChip[] {
ColorChip.COLOR_1,
ColorChip.COLOR_2,
ColorChip.COLOR_3,
ColorChip.COLOR_4}),
PALETTE(ColorCategory.PALETTE,
new ColorChip[] {
ColorChip.COLOR_5,
ColorChip.COLOR_6,
ColorChip.COLOR_7,
ColorChip.COLOR_8,
ColorChip.COLOR_9,
ColorChip.COLOR_10,
ColorChip.COLOR_11,
ColorChip.COLOR_12,
ColorChip.COLOR_13,
ColorChip.COLOR_14});
ColorChip.NAMO_ORANGE,
ColorChip.NAMO_PINK,
ColorChip.NAMO_YELLOW,
ColorChip.NAMO_BLUE,
ColorChip.LIGHT_GRAY,
ColorChip.RED,
ColorChip.PINK,
ColorChip.ORANGE,
ColorChip.YELLOW,
ColorChip.LIME,
ColorChip.LIGHT_GREEN,
ColorChip.GREEN,
ColorChip.CYAN,
ColorChip.LIGHT_BLUE,
ColorChip.BLUE,
ColorChip.LAVENDER,
ColorChip.PURPLE,
ColorChip.MAGENTA,
ColorChip.DARK_GRAY,
ColorChip.BLACK
});

private final ColorCategory category;
private final ColorChip[] containColors;
Expand All @@ -32,12 +37,8 @@ public static ColorChip[] getBasicColors() {
return BASIC.containColors;
}

public static ColorChip[] getPaletteColors() {
return PALETTE.containColors;
}

public static long[] getPaletteColorIds() {
return Arrays.stream(PALETTE.containColors)
public static long[] getBasicColorIds() {
return Arrays.stream(BASIC.containColors)
.mapToLong(colorChip -> colorChip.getId())
.toArray();
}
Expand Down

0 comments on commit 6580689

Please sign in to comment.