code stringlengths 41 34.3k | lang stringclasses 8
values | review stringlengths 1 4.74k |
|---|---|---|
@@ -0,0 +1,47 @@
+package christmas.domain.gift;
+
+import christmas.domain.plan.Menu;
+import java.util.Map;
+import java.util.Objects;
+
+public enum Gift {
+ EVENT_GIFT(Map.of(Menu.CHAMPAGNE, 1)),
+ NOTHING(Map.of());
+
+ private static final int MIN_GIFT_PRICE = 120_000;
+
+ private final Map<Menu, Inte... | Java | ์ด ๋ถ๋ถ์ ์ฆ์ ํ์ด ์ฌ๋ฌ๊ฐ๊ฐ ๋ ์ ์๋ค๋ ํ์ฅ์ฑ์ ๊ณ ๋ คํ์ ๊ฑด๊ฐ์?๐ |
@@ -0,0 +1,21 @@
+package christmas.view;
+
+import christmas.domain.badge.Badge;
+import java.util.Map;
+
+class BadgeView {
+
+ private static final Map<Badge, String> BADGE_TO_MESSAGE = Map.of(
+ Badge.SANTA, "์ฐํ", Badge.TREE, "ํธ๋ฆฌ",
+ Badge.STAR, "๋ณ", Badge.NOTHING, "์์");
+
+ private Bad... | Java | ๋ฆฌ๋ทฐ์ด๋์ ์ฝ๋๋ฅผ ๋ณด๊ณ ๊ถ๊ธํ๊ฒ ์๊ฒจ ์ด๋ป๊ฒ ์๊ฐํ์๋์ง ์ฌ์ญค๋ด
๋๋ค!
3์ฃผ์ฐจ ํผ๋๋ฐฑ ์ค "view๋ฅผ ์ํ ๋ก์ง์ ๋ถ๋ฆฌํ๋ค"๊ฐ ๋ชจ๋ธ์์๋ ๋ทฐ์ ๊ด๋ จ๋ ๊ฒ๋ค ์๋ฌด๊ฒ๋ ๊ฐ์ง ์ ์๋ ๊ฑธ ์๋ฏธํ๋ฉด ์ด ์ฒ๋ผ ๋ทฐ์์ ๋๋ฉ์ธ์ ๋ํด ๋ง์ ๊ฑธ ์์์ผํ๋ ์ ๋ ์๊ธธ ์๋ ์์ง ์์๊น์? |
@@ -0,0 +1,79 @@
+package christmas.controller;
+
+import christmas.domain.badge.Badge;
+import christmas.domain.discount.DiscountDetails;
+import christmas.domain.discount.TotalDiscountEvent;
+import christmas.domain.gift.Gift;
+import christmas.domain.plan.EventDate;
+import christmas.domain.plan.Menu;
+import christ... | Java | ์ ๋ ์ด๋ฐ ๋๋์ธ๋ฐ์.
์ ๋ ๋ทฐ๋ก๋ถํฐ ์
๋ ฅ์ ์์ฒญํ๋ ์ปจํธ๋กค๋ฌ๋ค์ ์ปจํธ๋กคํ๋ ์ปจํธ๋กค๋ฌ๋ฅผ ๋ง๋ค์์ต๋๋ค ๐ |
@@ -0,0 +1,79 @@
+package christmas.controller;
+
+import christmas.domain.badge.Badge;
+import christmas.domain.discount.DiscountDetails;
+import christmas.domain.discount.TotalDiscountEvent;
+import christmas.domain.gift.Gift;
+import christmas.domain.plan.EventDate;
+import christmas.domain.plan.Menu;
+import christ... | Java | ์ค DTO์ ๋น๋ ํจํด์ ์ฌ์ฉํ์
จ๋ค์ ์คํ๋ง ์ด๋
ธํ
์ด์
์์ ์ฌ์ฉํ๋ ๊ฑด๋ฐ ํ๋ฅญํฉ๋๋ค! |
@@ -0,0 +1,27 @@
+package christmas.domain.discount.policy;
+
+import christmas.domain.plan.EventSchedule;
+import christmas.domain.plan.Plan;
+import java.util.function.IntUnaryOperator;
+
+public class ChristmasDDayDiscount extends DiscountPolicy {
+
+ private static final int START_DATE = 1;
+ private static f... | Java | ์ด๋ฒ ๊ณผ์ ์์ ๋๋ค๋ฅผ ๋ง์ด ์ฐ์ตํด๋ณด๊ณ ์ถ์๋๋ฐ {() -> } ์ธ์๋ ์ด๋ ๊ฒ ์ธ ์ ์๊ฒ ๊ตฐ์! ์ข์ ์ ๋ณด ์ป์ด๊ฐ๋๋ค! |
@@ -0,0 +1,29 @@
+package christmas.view;
+
+import christmas.exception.DateInputException;
+import christmas.exception.OnlyDrinkMenuException;
+import christmas.exception.OrderInputException;
+import christmas.exception.TotalMenuCountException;
+import java.util.Map;
+
+class ErrorMessageView {
+
+ private static f... | Java | ๊ฐ ์์ธ ๋ฉ์์ง๋ฅผ ๋งต์ผ๋ก ๋ด๋ ๋ฐฉ๋ฒ ์ ๋ง ๊ธฐ๋ฅ์ฐจ๋ค์... |
@@ -0,0 +1,79 @@
+package christmas.controller;
+
+import christmas.domain.badge.Badge;
+import christmas.domain.discount.DiscountDetails;
+import christmas.domain.discount.TotalDiscountEvent;
+import christmas.domain.gift.Gift;
+import christmas.domain.plan.EventDate;
+import christmas.domain.plan.Menu;
+import christ... | Java | Plan ๊ฐ์ฒด๋ฅผ ์์ฑํ ๋ EventDate์ Order ๊ฐ์ฒด๋ฅผ ํ ๋ฒ์ ๋ฃ์ด์ ์์ฑํ๋ ๊ฒ์ด ๊น๋ํ๊ธฐ๋ ํ์ง๋ง EventDate์ Order๋ฅผ ์์ฑ์ ๊ฒ์ฆํ๋๋ฐ ๋ฐฉ๋ฌธ ๋ ์ง์ ์ฃผ๋ฌธ ๋๋ฉ์ธ์ด ์ปจํธ๋กค๋ฌ์ ๋
ธ์ถ๋๋๊ฒ์ด ์๋๊ฐ ์๊ฐ์ด ๋๋๋ฐ์, ์ด ๋ถ๋ถ์ ์ด๋ป๊ฒ ์๊ฐํ์๋์? |
@@ -0,0 +1,79 @@
+package christmas.controller;
+
+import christmas.domain.badge.Badge;
+import christmas.domain.discount.DiscountDetails;
+import christmas.domain.discount.TotalDiscountEvent;
+import christmas.domain.gift.Gift;
+import christmas.domain.plan.EventDate;
+import christmas.domain.plan.Menu;
+import christ... | Java | ๋ง์ฐฌ๊ฐ์ง๋ก ์ปจํธ๋กค๋ฌ์์ ๋ฐฉ๋ฌธ๋ ์ง์ ์ฃผ๋ฌธ์ ๊ฐ์ง๊ณ ์๋ Plan ๊ฐ์ฒด๋ฅผ ํตํด ํ ์ธ์ ์ ์ฉํ์๋๋ฐ,
ํ ์ธ ์ ์ฉ์ด๋ผ๋ ๋น์ฆ๋์ค ๋ก์ง์ด ๋
ธ์ถ๋์ด์๋ ๊ฒ์ด ์๋๊ฐ ์๊ฐ์ด ๋ญ๋๋ค.
์๋น์ค ๋ ์ด์ด์์ ์ฒ๋ฆฌํ์ง ์์ ์ด์ ๊ฐ ์์ผ์ ์ง ๊ถ๊ธํฉ๋๋ค. |
@@ -0,0 +1,33 @@
+package christmas.domain.badge;
+
+import java.util.List;
+
+public enum Badge {
+
+ SANTA(20_000),
+ TREE(10_000),
+ STAR(5_000),
+ NOTHING(0);
+
+ private static final List<Badge> ORDER_BY_BENEFIT = List.of(SANTA, TREE, STAR, NOTHING);
+
+ private final int minBenefitAmount;
+
+ ... | Java | values() ๋ฑ์ผ๋ก ๊ฐ์ ธ์ค๋ฉด ์์๊ฐ ์ ๊ฐ ์์ฑํ ์์์ ์ํฅ์ ๋ฐ๋๋ค๊ณ ์๊ฐํด์ ์ผ๋ถ๋ฌ `ORDER_BY_BENEFIT`์ ๋ง๋ค์์ต๋๋ค. ๊ทธ๋ฐ๋ฐ ๋ค๋ฅธ ์ฝ๋๋ค์ ๋ณด๋ `Arrays.stream(values()).sort(this::price)` ํ์์ผ๋ก ๋ง์ด ์ฌ์ฉ ํด์ผ ๊ฒ ๋๋ผ๊ตฌ์. |
@@ -0,0 +1,27 @@
+package christmas.domain.discount.policy;
+
+import christmas.domain.plan.EventSchedule;
+import christmas.domain.plan.Plan;
+import java.util.function.IntUnaryOperator;
+
+public class ChristmasDDayDiscount extends DiscountPolicy {
+
+ private static final int START_DATE = 1;
+ private static f... | Java | ๋๋ฉ์ธ๋ผ๋ฆฌ ์ ๋ณด๋ฅผ ์ฃผ๊ณ ๋ฐ๋๋ฐ getter๋ฅผ ์์ฐ๋ ๊ฒ์ด ๊ฐ์ธ์ ์ธ ์ด๋ฒ ๊ณผ์ ๋ชฉํ์์ต๋๋ค. ๊ทธ๋์ date ๋ผ๋ int ๊ฐ์ ๋ฐ์์ค๊ธฐ ๋ณด๋ค, date๋ฅผ ํตํด ๊ณ์ฐํ๋ ์์ ๋๊ฒจ์ฃผ์์ต๋๋ค.
๋ค์ ์๊ฐํด๋ณด๋ฉด ์ด์ ๋๋ getter๋ก ์จ๋ ๋์ง ์๋ ์ถ์ง๋ง, ๊ทธ๋ฅ ์ต๋ํ ๊ฐ์ฒด๋ต๊ฒ ์ฌ์ฉํ๋ ํ์์ผ๋ก ํด๋ณด์์ต๋๋ค! |
@@ -0,0 +1,47 @@
+package christmas.domain.gift;
+
+import christmas.domain.plan.Menu;
+import java.util.Map;
+import java.util.Objects;
+
+public enum Gift {
+ EVENT_GIFT(Map.of(Menu.CHAMPAGNE, 1)),
+ NOTHING(Map.of());
+
+ private static final int MIN_GIFT_PRICE = 120_000;
+
+ private final Map<Menu, Inte... | Java | ๋ต! ํ์ฅ์ฑ์ ๊ณ ๋ คํ์ต๋๋ค! |
@@ -0,0 +1,21 @@
+package christmas.view;
+
+import christmas.domain.badge.Badge;
+import java.util.Map;
+
+class BadgeView {
+
+ private static final Map<Badge, String> BADGE_TO_MESSAGE = Map.of(
+ Badge.SANTA, "์ฐํ", Badge.TREE, "ํธ๋ฆฌ",
+ Badge.STAR, "๋ณ", Badge.NOTHING, "์์");
+
+ private Bad... | Java | ๋ง์ต๋๋ค. ์ด๋ ๊ฒ ๋๋ฉด View๊ฐ ๊ต์ฅํ ์ปค์ง๊ฒ ๋ฉ๋๋ค. ํ์์ ์ ๋ enum์์ ๊ด๋ฆฌํ๋๋ฐ ์ด๋ฒ์ฃผ ๊ณผ์ ์๋ ์๊ตฌ์ฌํญ์ ๊ทนํ์ผ๋ก ์ฑ๊ธฐ๊ณ ์ถ์์ต๋๋ค.
์ง๋ฌธํ์ ๋ถ๋ถ์ด ๊ต์ฅํ ๋ ์นด๋ก์ฐ์๋ค์. "๋ฐ์ง์ง ์๊ณ ์๊ตฌ ์ฌํญ์ ์ต๋ํ ์ง์ผ๋ณด์"๋ ๋ถ๋ถ์ ์ ๋ถ ์ธ๊ธํ์ ๊ฒ ๊ฐ์ต๋๋ค. ๋ ์นด๋ก์ด ๋ฆฌ๋ทฐ ๊ฐ์ฌ๋๋ฆฝ๋๋ค. |
@@ -0,0 +1,48 @@
+package christmas.domain.plan;
+
+public enum Menu {
+
+ MUSHROOM_SOUP(6_000, Category.APPETIZER),
+ TAPAS(5_500, Category.APPETIZER),
+ CAESAR_SALAD(8_000, Category.APPETIZER),
+
+ T_BONE_STEAK(55_000, Category.MAIN),
+ BARBECUE_RIBS(54_000, Category.MAIN),
+ SEAFOOD_PASTA(35_000, C... | Java | ๊ฐ ์นดํ
๊ณ ๋ฆฌ๋ณ๋ก๋ enum์ ์ ์ํด์ ๊ด๋ฆฌํ๋ ๋ฐฉ๋ฒ๋ ์์๊ฑฐ๋ผ๊ณ ์๊ฐ์ด ๋ญ๋๋ค! |
@@ -0,0 +1,27 @@
+package christmas.view;
+
+import christmas.dto.DiscountEventDto;
+import java.util.Map;
+
+class BenefitDetailView {
+
+ private static final Map<DiscountEventDto, String> DISCOUNT_EVENT_TO_MESSAGE = Map.of(
+ DiscountEventDto.CHRISTMAS_D_DAY, "ํฌ๋ฆฌ์ค๋ง์ค ๋๋ฐ์ด ํ ์ธ", DiscountEventDto.WEEKDAY, "... | Java | ์ธ์ธํ๊ฒ ๋๋๋ค๋ณด๋ ํ ์ธ์ ๋ํ ์ ๋ณด๋ฅผ ๋ทฐ๊ฐ ๊ฐ๊ฒ๋ ๊ฒ ๊ฐ๋ค์.
์์ ๋ค์ฌ๋์ด ๋ง์ํ์ ๊ฒ ์ฒ๋ผ ๋ทฐ๊ฐ ๋๋ฉ์ธ์ ๊ด๋ จํ ์ ๋ณด๋ฅผ ๊ฐ๊ฒ๋๊ณ ๋ณ๊ฒฝ ํฌ์ธํธ ๋ํ ๋์ง ์์๊น ํฉ๋๋ค. |
@@ -0,0 +1,103 @@
+package christmas.domain.plan;
+
+import christmas.exception.OnlyDrinkMenuException;
+import christmas.exception.OrderInputException;
+import christmas.exception.TotalMenuCountException;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.function.Predicate;
+
+public class Order {
... | Java | ์ ๋ ์ด๋ ๊ฒ ํ๋ค๊ฐ ํ์์ด ์ฅ์ ์ธ Map ๊ฐ์ง๊ณ ์๊พธ ์ํํ๋๋ฐ์ ์ฌ์ฉํ๋๊ฒ ๊ฐ์์
`public record menuToCount(Menu menu, int quantity){}`
์ด๋ ๊ฒ ๋ง๋ค์ด์ ์ํ์ ์ ์ ํ๊ฒ `List<menuToCount>` ์ด๋ ๊ฒ ์ฌ์ฉํ๋๋ฐ ๊ทธ๋ฅ Map ์ฌ์ฉํ์ ์ด์ ๊ฐ ์์๊น์?? |
@@ -0,0 +1,21 @@
+package christmas.domain.discount.policy;
+
+import christmas.domain.plan.EventSchedule;
+import christmas.domain.plan.Plan;
+import java.util.Set;
+
+public class SpecialDiscount extends DiscountPolicy {
+
+ private static final EventSchedule EVENT_SCHEDULE = EventSchedule.from(Set.of(3, 10, 17, 2... | Java | ํน๋ณ ์ด๋ฒคํธ ๋ ์ง๋ ์ผ์์ผ + ํฌ๋ฆฌ์ค๋ง์ค๋ ์ธ๋ฐ, ์ด ๋ถ๋ถ์ ๋ช
ํํ๊ฒ ๋๋ ค๋์ผ๋ฉด ๋ ์ข์ง ์์์๊น ์ถ์ด์! |
@@ -0,0 +1,47 @@
+package christmas.domain.gift;
+
+import christmas.domain.plan.Menu;
+import java.util.Map;
+import java.util.Objects;
+
+public enum Gift {
+ EVENT_GIFT(Map.of(Menu.CHAMPAGNE, 1)),
+ NOTHING(Map.of());
+
+ private static final int MIN_GIFT_PRICE = 120_000;
+
+ private final Map<Menu, Inte... | Java | ์ด๋ ๊ฒ ์ฆ์ ์ด๋ฒคํธ๋ง ๋ฐ๋ก ๋ค๋ฃจ์
จ๊ตฐ์ ์ข์ ๋ฐฉ๋ฒ ์์๊ฐ๋๋ค! |
@@ -0,0 +1,76 @@
+package christmas.domain.plan;
+
+import christmas.exception.DateInputException;
+import java.time.DayOfWeek;
+import java.time.LocalDate;
+import java.util.Objects;
+import java.util.Set;
+import java.util.function.IntUnaryOperator;
+
+public class EventDate {
+
+ private static final int YEAR = 2... | Java | ์ ๋ LocalDate๋ฅผ ๊ทธ๋ฅ ์ฌ์ฉํ์๋๋ฐ, ์ด๋ ๊ฒ ๋ฐ๋ก ํด๋์ค๋ก ํ์ ๋ค๋ฃจ๋๊ฒ ํจ์ฌ ๊น๋ํ๊ฒ ๊ฐ๋ค์ |
@@ -0,0 +1,79 @@
+package christmas.controller;
+
+import christmas.domain.badge.Badge;
+import christmas.domain.discount.DiscountDetails;
+import christmas.domain.discount.TotalDiscountEvent;
+import christmas.domain.gift.Gift;
+import christmas.domain.plan.EventDate;
+import christmas.domain.plan.Menu;
+import christ... | Java | "์ด์ฉ ์ ์๋ ๋ถ๋ถ์ด๋ค"๋ผ๊ณ ์๊ฐํฉ๋๋ค.
์๋๋ ๊ทธ๋ฅ ์ง๊ธ ์ฆ๊ฐ์ ์ผ๋ก ๋ ์ ์๊ฐ์
๋๋ค. (๋ถ๋ช
ํ ์ฑ
์ด๋ ๊ธ์์ ๋ดค์ํ
๋ฐ...)
- ๊ฐ์ฒด๋ ์์ฑ์์์ ์ธ์๋ฅผ ํตํด ์ฃผ์
๋ฐ๋ ๊ฒ์ด ํ
์คํธ ์ฝ๋๋ฅผ ์ง๋๋ฐ ์ฉ์ดํ๋ค (๋ด๋ถ์์ ์์ฑํ์ง ๋ง๊ณ )
- ๊ฐ์ฒด๋ ์๋ก์ ๋ํด ๋ชจ๋ฅด๋ฉด ๋ชจ๋ฅผ์๋ก (์์กด์ฑ์ด ๋ฎ์์๋ก) ์ข๋ค.
์ฌ์ค 1๋ฒ์ ์งํฌ๋ ค๋ฉด ์ง๊ธ์ฒ๋ผ ์ธ๋ถ์์ ์์ฑํด์ ๋ฃ์ด์ฃผ์ด์ผ ํฉ๋๋ค. ๊ทธ๋ฆฌ๊ณ Controller์ ๋๋ฉ์ธ ๊ฐ์ ์ข
์์ฑ์ ์ค์ด๋ ค๋ฉด (2๋ฒ์ ์งํค๋ ค๋ฉด) EventDate์ Order๋ฅผ Plan๋ด๋ถ์์ ์์ฑํด์ผ ํ์ฃ . ๊ทธ๋ฅ ์งํฌ ๊ฒ ๋ง๋ค๋ณด๋ฉด ๋ชจ๋ ์งํฌ ์๋ ์... |
@@ -0,0 +1,79 @@
+package christmas.controller;
+
+import christmas.domain.badge.Badge;
+import christmas.domain.discount.DiscountDetails;
+import christmas.domain.discount.TotalDiscountEvent;
+import christmas.domain.gift.Gift;
+import christmas.domain.plan.EventDate;
+import christmas.domain.plan.Menu;
+import christ... | Java | ์๋ง๋ ์ค์ง์ ์ผ๋ก๋ ํ๋ก๊ทธ๋จ์ด ์์ ํฌ๊ธฐ์ด๋ค ๋ณด๋ Service Layer๋ก๊น์ง ๋ถ๋ฆฌํ ํ์์ฑ์ ๋ชป๋๋ ๊ฒ ๊ฐ์ต๋๋ค. ๋ฉ์๋๋ฅผ ๋ถ๋ฆฌํ๋ ๊ฒ ๋ง์ผ๋ก๋ ์ถฉ๋ถํ๋ค๊ณ ์๊ฐํ์ต๋๋ค. ๋ง์ฝ ์ฌ๊ธฐ์์ ํ๋ก๊ทธ๋จ์ด ์ ์ ์ปค์ง๋ค๋ฉด Service Layer๊ฐ ํ์ํ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,48 @@
+package christmas.domain.plan;
+
+public enum Menu {
+
+ MUSHROOM_SOUP(6_000, Category.APPETIZER),
+ TAPAS(5_500, Category.APPETIZER),
+ CAESAR_SALAD(8_000, Category.APPETIZER),
+
+ T_BONE_STEAK(55_000, Category.MAIN),
+ BARBECUE_RIBS(54_000, Category.MAIN),
+ SEAFOOD_PASTA(35_000, C... | Java | ์ ๋ Menu Enum์๊ฒ์ public method๋ฅผ ์ ๊ณตํด์ผ ํ๊ธฐ ๋๋ฌธ์ ์ด ๋ฐฉ์์ด ํจ์จ์ ์ด๋ผ๊ณ ์๊ฐํ์ต๋๋ค. ๊ฐ ์นดํ
๊ณ ๋ฆฌ๋ณ๋ก๋ enum์ ๊ด๋ฆฌํ๋ ์ฝ๋๋ ์ด๋ค ๋๋์ผ๊น์? ๊ทธ๋ฆฌ๊ณ ๊ทธ ๋ฐฉ์์ด ์ด ๋ฐฉ์๋ณด๋ค ๋ ์ข์ ์ ์ ๋ฌด์์ด ์์๊น์? |
@@ -0,0 +1,27 @@
+package christmas.view;
+
+import christmas.dto.DiscountEventDto;
+import java.util.Map;
+
+class BenefitDetailView {
+
+ private static final Map<DiscountEventDto, String> DISCOUNT_EVENT_TO_MESSAGE = Map.of(
+ DiscountEventDto.CHRISTMAS_D_DAY, "ํฌ๋ฆฌ์ค๋ง์ค ๋๋ฐ์ด ํ ์ธ", DiscountEventDto.WEEKDAY, "... | Java | ๋ณ๊ฒฝ ํฌ์ธํธ๊ฐ ๋์ด๋๋ค๋ ์ , ํฅ๋ฏธ๋กญ๋ค์. ํ์คํ ์ ์ฑ
์ด ํ๋ ๋ ์ถ๊ฐ๋๋ค๋ฉด, enum์๋ ์ถ๊ฐํ๊ณ BenefitDetailView์๋ ์ถ๊ฐ๋์ด์ผ ํ๋ ์ข ๊ทธ๋ ๋ค์. ์ด๊ฑธ ๊ตฌํํ ๋ ์ ์๊ฐ์ ์ด๋ฌ์ต๋๋ค.
> ๋ง์ฝ์ "ํฌ๋ฆฌ์ค๋ง์ค ๋๋ฐ์ด ํ ์ธ"์ด๋ผ๋ ์ถ๋ ฅ ํ
์คํธ๋ฅผ "ํฌ๋ฆฌ์ค๋ง์ค D-day ํ ์ธ"์ผ๋ก ์์ ํ๋ค๊ณ ํ๋ฉด, ํด๋น ์ฝ๋๋ ์ด๋์ ์์ด์ผ ํ ๊น?
์ด ์ง๋ฌธ์์ ์ถ๋ฐํ์ต๋๋ค. ์ ๋ '์ถ๋ ฅ ํ์์ ์์ 'ํ๋ ๊ฒ์ด๊ธฐ ๋๋ฌธ์ view package์ ์์ด์ผ ํ๋ค๊ณ ์๊ฐํ์ต๋๋ค. ์ถ๋ ฅ ํ์์ด ๋๋ฉ์ธ์ ๋ฐ๋ผ ์ฌ๊ธฐ ์ ๊ธฐ์ ํผ์ ธ์๋ ๊ฒ๋ ์์ ํ๋๋ฐ ๋ณ๋ก๋ผ๊ณ ์๊ฐํฉ๋๋ค.... |
@@ -11,12 +11,178 @@ on:
jobs:
code_review:
runs-on: ubuntu-latest
- name: ChatGPT Code Review
+ name: Gemini Code Review
steps:
- - uses: anc95/ChatGPT-CodeReview@main
+ - uses: actions/checkout@v4
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ ... | Unknown | ์ด ์ฝ๋๋ GitHub Actions๋ฅผ ์ด์ฉํ์ฌ Google Gemini API๋ฅผ ํตํด Pull Request์ ๋ํ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์๋ํํ๋ ์์
์
๋๋ค. ํ์ง๋ง ๋ช ๊ฐ์ง ๊ฐ์ ์ด ํ์ํฉ๋๋ค.
**1. ์ฝ๋์ ํ์ง๊ณผ ๊ฐ๋
์ฑ:**
* **๊ฐ๋
์ฑ ๊ฐ์ :** `reviewCode` ํจ์ ๋ด๋ถ์ JSON ๊ตฌ์กฐ๊ฐ ์ค์ฒฉ๋์ด ๊ฐ๋
์ฑ์ด ๋จ์ด์ง๋๋ค. ๋ ๋ช
ํํ ๋ณ์๋ช
์ ์ฌ์ฉํ๊ณ , JSON ์์ฑ ๋ถ๋ถ์ ์ฌ๋ฌ ์ค๋ก ๋๋์ด ๊ฐ๋
์ฑ์ ๋์ฌ์ผ ํฉ๋๋ค. ์๋ฅผ ๋ค์ด, `contents`, `parts` ๋ฑ์ ๋ณ์๋ช
์ ์ปจํ
์คํธ๋ฅผ ๋ช
ํํ ํ๋๋ก ์์ ํ ์ ์์ต๋๋ค.
* **์ค๋ฅ ์ฒ๋ฆฌ ๋ถ์กฑ:*... |
@@ -11,12 +11,178 @@ on:
jobs:
code_review:
runs-on: ubuntu-latest
- name: ChatGPT Code Review
+ name: Gemini Code Review
steps:
- - uses: anc95/ChatGPT-CodeReview@main
+ - uses: actions/checkout@v4
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ ... | Unknown | ## Gemini Code Review Workflow ํ์ผ ๋ฆฌ๋ทฐ (code_review.yml)
๋ค์์ ์ ๊ณต๋ `code_review.yml` ํ์ผ์ ๋ํ ์์ธ ๋ฆฌ๋ทฐ์
๋๋ค. ์๋์ด ๊ฐ๋ฐ์์ ๊ด์ ์์ ์ฝ๋ ํ์ง, ์ ์ฌ์ ๋ฌธ์ ์ , ์ฑ๋ฅ ๊ฐ์ , ๋ณด์ ์ด์ ๋ฐ ๊ฐ์ ์ ์์ ๋ค๋ฃน๋๋ค.
**1. ์ฝ๋์ ํ์ง๊ณผ ๊ฐ๋
์ฑ**
* **์ ๋ฐ์ ์ผ๋ก ์ํธ:** ์ฝ๋์ ๊ตฌ์กฐ๊ฐ ๋น๊ต์ ๋ช
ํํ๊ณ , ์ฃผ์์ด ์ ์ ํ๊ฒ ์ฌ์ฉ๋์ด ๊ฐ๋
์ฑ์ด ๋์ต๋๋ค. ํจ์๋ณ ์ญํ ๋ถ๋ด๋ ์ ๋์ด ์์ต๋๋ค.
* **ํจ์๋ช
:** ํจ์๋ช
(`reviewCode`, `processFile`)์ ์ญํ ์ ๋ช
ํํ ์ค๋ช
ํ๋ฉฐ... |
@@ -11,12 +11,178 @@ on:
jobs:
code_review:
runs-on: ubuntu-latest
- name: ChatGPT Code Review
+ name: Gemini Code Review
steps:
- - uses: anc95/ChatGPT-CodeReview@main
+ - uses: actions/checkout@v4
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ ... | Unknown | ## .github/workflows/code_review.yml ์ฝ๋ ๋ฆฌ๋ทฐ
๋ค์์ ์ฃผ์ด์ง `.github/workflows/code_review.yml` ํ์ผ์ ๋ํ ์ฝ๋ ๋ฆฌ๋ทฐ์
๋๋ค.
**1. ์ฝ๋ ํ์ง ๋ฐ ๊ฐ๋
์ฑ**
* **์ ๋ฐ์ ์ผ๋ก ์ํธ:** ์ฝ๋๋ ๋น๊ต์ ๊น๋ํ๊ณ ๊ฐ๋
์ฑ์ด ์ข์ต๋๋ค. ์ฃผ์๋ ์ ์ ํ๊ฒ ๋ฌ๋ ค ์์ด ์ฝ๋์ ์๋๋ฅผ ํ์
ํ๋ ๋ฐ ๋์์ด ๋ฉ๋๋ค.
* **์ผ๊ด์ฑ:** ๋ค์ฌ์ฐ๊ธฐ, ๋ณ์๋ช
๊ท์น ๋ฑ์ด ์ผ๊ด์ฑ์ ์ ์งํ๊ณ ์์ต๋๋ค.
* **๋ชจ๋ํ:** `reviewCode`, `processFile` ๋ฑ์ ํจ์๋ก ๋ก์ง์ ๋ถ๋ฆฌํ์ฌ ์ฌ์ฌ์ฉ์ฑ๊ณผ ์ ์ง... |
@@ -0,0 +1,88 @@
+import styled from "styled-components";
+
+export const ReviewSectionName = styled.h2`
+
+`;
+
+export const ReviewFormArea = styled.div`
+ position: absolute;
+ width: 918px;
+ height: 240px;
+ padding: 14px 23px;
+ background-color: #00462A;
+ border-radius: 20px;
+ flex-directi... | Unknown | styled-component ๊น๋ํ๊ฒ ์ ์ฐ์ ๊ฒ ๊ฐ์์! ์๊ณ ๋ง์ผ์
จ์ต๋๋ค~ |
@@ -0,0 +1,150 @@
+//
+// MyDetailReviewViewController.swift
+// Pyonsnal-Color
+//
+// Created by ์กฐ์์ on 5/19/24.
+//
+
+import ModernRIBs
+import UIKit
+
+protocol MyDetailReviewPresentableListener: AnyObject {
+ func didTapBackButton()
+}
+
+final class MyDetailReviewViewController: UIViewController,
+ ... | Swift | [C]
์๋์ `applySnapshot(with: , review:)` ํจ์์ ๋งค๊ฐ๋ณ์๋ฅผ ์ธ๋ถ์์ ์ ๋ฌ๋ฐ๋๋ก ํ๊ณ ๋ทฐ์ปจ ๋ด๋ถ์์๋ `productDetail, review` ๊ฐ์ ์ ๋ณด๋ฅผ ๋ชจ๋ฅด๊ฒ ํ๋ ๋ฐฉ๋ฒ์ ์ด๋จ๊น์?
(๋ทฐ์ปจ์ด ๋ฉ์ฒญํ๋๋ก..!) |
@@ -0,0 +1,96 @@
+//
+// MyReviewViewController.swift
+// Pyonsnal-Color
+//
+// Created by ์กฐ์์ on 5/19/24.
+//
+
+import ModernRIBs
+import UIKit
+
+protocol MyReviewPresentableListener: AnyObject {
+ func didTapMyReviewBackButton()
+ func didTapMyDetailReview(with productDetail: ProductDetailEntity, reviewId... | Swift | `automaticDimension` ์ง์ ํด์ค ์ด์ ๊ฐ ์
๋ง๋ค ๋ค๋ฅธ ๋์ด๊ฐ ์ฃผ๊ธฐ ์ํด์ ์ธ๊ฐ์? |
@@ -0,0 +1,41 @@
+//
+// MyReviewContentConfiguration.swift
+// Pyonsnal-Color
+//
+// Created by ์กฐ์์ on 5/19/24.
+//
+
+import UIKit
+
+struct MyReviewContentConfiguration: UIContentConfiguration {
+ var storeImageIcon: ConvenienceStore
+ var imageUrl: URL
+ var title: String
+ var date: String?
+ va... | Swift | `UIContentConfiguration` ํ์ฉํ๋ ๋ฐฉ๋ฒ ๋๋ถ์ ๋ฐฐ์ ์ต๋๋ค ๐ |
@@ -0,0 +1,58 @@
+//
+// MyReviewContentView.swift
+// Pyonsnal-Color
+//
+// Created by ์กฐ์์ on 5/19/24.
+//
+
+import UIKit
+import SnapKit
+
+class MyReviewContentView: UIView, UIContentView {
+ static let identifier = "MyReviewContentView"
+
+ var configuration: any UIContentConfiguration
+ private l... | Swift | [C]
์ค~ ์ฒ์ ๋ณด๋ ์น๊ตฌ๋ค์ ๐ |
@@ -0,0 +1,33 @@
+import letters from "../mockData";
+
+const sleep = n => new Promise(resolve => setTimeout(resolve, n));
+
+export const getLetters = async () => {
+ await sleep(500);
+ return letters;
+};
+
+export const getLetterById = async id => {
+ await sleep(100);
+ return letters.find(letter => letter.id ... | JavaScript | ๋ฐฐ์ด์์ ์ํ๋ ์กฐ๊ฑด๊น์ง๋ง ์ฐพ๋ find method๋ฅผ ์ฌ์ฉํ ๊ฑด ์ข์๋ณด์
๋๋ค ! |
@@ -0,0 +1,24 @@
+import React from "react";
+import styled from "styled-components";
+
+const Footer = () => {
+ return (
+ <FooterBlock>
+ <p className="copyright">© Museop Kim</p>
+ </FooterBlock>
+ );
+};
+
+const FooterBlock = styled.div`
+ display: flex;
+ justify-content: center;
+ align-ite... | Unknown | style components๋ฅผ ์ฌ์ฉํ์๋๊น
`box-shadow: 0px -10px 35px 5px #f1f1f1;`
๋ถ๋ถ์ ์์ ๊ฐ์ ๊ฒฝ์ฐ๋ styled-components ThemeProvider๋ฅผ ์ฌ์ฉํด ๋ณด๋๊ฑด ์ด๋จ๊น์.
๋ชจ๋ ์ปดํฌ๋ํธ๊ฐ ์ ๋ฌ๋ฐ์ ์์์ ๋์ผํ๊ฒ ์ฌ์ฉํ๋ฉด ๋คํฌ๋ชจ๋์ ๊ฐ์ ๊ธฐ๋ฅ์ ๊ตฌํํ ๋๋ ์์ฝ๊ฒ ์คํ์ผ ๋ณ๋์ด ๊ฐ๋ฅํฉ๋๋ค.
๋๋ฌด ๋ง์ด ์งํ๋ ํ๋ก์ ํธ๋ ์คํ์ผ ์์คํ
์ ๊ตฌ์ถํ๊ธฐ ์ฝ์ง ์์ผ๋๊น ์ข ์์ ๋จ์์ผ ๋ ์๋ํด ๋ณด๋๊ฒ๋ ์ข์๊ฑฐ ๊ฐ์์ ๐ |
@@ -0,0 +1,47 @@
+import React from "react";
+import styled from "styled-components";
+import { Link } from "react-router-dom";
+
+const Navigation = () => {
+ return (
+ <NavigationBlock>
+ <Link to="/">์ ์ฒญ๊ณก</Link>
+ <Link to="/ranking">์ ์ฒญ๊ณก ์์</Link>
+ <Link to="/contents">์ ์ฒญ๊ณก ์ ํ๋ธ ์์</Link>
+ <L... | Unknown | ํฐํธ์ ๊ฐ์ด ๋ฐ์ํ์ ์ํฅ์ ๋ฐ์์ผ ํ๋ ๊ธฐ์ค๊ณผ ๊ทธ๋ ์ง ์์ ์์๋ฅผ ๊ธฐ์ค์ผ๋ก px๊ณผ rem์ ์ฌ์ฉํ์๋ ๊ฑด๊ฐ์ ?
๊ทธ๋ฐ ์๋๋ผ๋ฉด ์ข์๋ณด์
๋๋ค. |
@@ -0,0 +1,147 @@
+import React from "react";
+import styled from "styled-components";
+
+const MAX_LENGTH = 100;
+
+const Letter = ({
+ id,
+ user,
+ song,
+ songStory,
+ createdDateTime,
+ onReadLetter
+}) => {
+ const { username, avatarUrl } = user;
+ const { title, artist, imageUrl } = song;
+
+ return (
+... | Unknown | className ์ปจ๋ฒค์
์ค "-"์ "_"๋ ์ด๋ค ๊ธฐ์ค์ด ์์๊น์ ? ๊ถ๊ธํฉ๋๋ค ใ
|
@@ -0,0 +1,29 @@
+import React from "react";
+import styled from "styled-components";
+import LetterContainer from "../../containers/Letter/LetterContainer";
+
+const LetterList = ({ letters }) => {
+ return (
+ <LetterListBlock>
+ {letters.map(letter => (
+ <LetterContainer
+ key={letter.id}
+... | Unknown | ๋ณดํต Container๋ ์ข ๋ ํฐ ๋จ์์์์ ์๋ฏธ์์ ์ฌ์ฉ๋๊ณค ํ๋๊ฑฐ ๊ฐ์์.
์ฌ๋ฌ ์์ ์ปดํฌ๋ํธ๋ฅผ ๊ฐ์ง๊ณ ๋ง์ ์ด๋ฒคํธ ๋ก์ง์ ๊ฐ์ง๊ณ ์๋ ์ผํฐ์ ๋๋์ผ๋ก ๋ค์ด๋ฐ์ ํ๊ณค ํ๋๋ฐ
LetterList๋ฉด LetterItem๊ณผ ๊ฐ์ด ๋จ์ผํ๊ฒ ํํํด ์ฃผ๋๊ฒ๋ ์ข์๊ฑฐ ๊ฐ์์ ! |
@@ -0,0 +1,30 @@
+import React, { useEffect, useState } from "react";
+import ModalTemplate from "../Template/Modal/ModalTemplate";
+import LetterDetailsSong from "./LetterDetailsSong";
+import LetterDetailsSongStory from "./LetterDetailsSongStory";
+import LetterModalTemplate from "../Template/LetterModal/LetterModalT... | Unknown | `const { song, songStory, createdDateTime, user } = letter;`
๋๋ฌด ๋ง์ ์์ ๊ฐ์ฒด Props๊ฐ ์๋๋ผ๋ฉด ์ด ๋ถ๋ถ ๊ฐ์ ๊ฒฝ์ฐ๋ ๊ฐ๊ฐ ์ด๋ฆ์ ๊ฐ์ง Props๋ก ์ ๋ฌํด ์ฃผ๋๊ฒ๋ ์ข์๊ฑฐ ๊ฐ๋ค๋ ์๊ฐ์ด ๋ญ๋๋ค! ๊ทธ๋ฌ๋ฉด ๊ฐ๋จํ๊ฒ ์ปดํฌ๋ํธ์ ์ง์ ๋ค์ด์ ๋ณด์ง ์์๋ ์ ๋ฌ๋๋ Props ๋ง์ผ๋ก ์ญํ ์ ์ ์ถํด ๋ณผ ์ ์์๊ฑฐ ๊ฐ์์. |
@@ -0,0 +1,45 @@
+import React, { useEffect } from "react";
+import { MdMoreHoriz } from "react-icons/md";
+import styled, { css } from "styled-components";
+import LetterDetailsHiddenMenuButton from "./LetterDetailsHiddenMenuButton";
+
+const LetterDetailsHiddenMenu = ({
+ isMouseEnter,
+ isMenuOpen,
+ onToggle,
+ ... | Unknown | visibility: hidden; , display : none ์ ์ฐจ์ด๋ฅผ ์์๋์ ? ใ
ใ
๋ชจ๋ฅด๊ณ ๊ณ์ ๋ค๋ฉด ํ๋ฒ ์์๋ณด๋๊ฒ๋ ์ข์ต๋๋ค ! ๋๋จํ๊ฑด ์๋๊ณ ๊ทธ๋ฅ DOM ํธ๋ฆฌ์ ๊ด๋ จ๋ ๋ด์ฉ์ด์์. |
@@ -0,0 +1,28 @@
+import React from "react";
+import LetterModalSong from "../LetterModal/LetterModalSong/LetterModalSong";
+import SongAbout from "../LetterModal/LetterModalSong/SongAbout";
+import SongArticle from "../LetterModal/LetterModalSong/SongArticle";
+import SongArticleItem from "../LetterModal/LetterModalSo... | Unknown | ์ด ๋ถ๋ถ์ ๊ฒฝ์ฐ ๋ฐ๋ณต๋๋ ์ปดํฌ๋ํธ๋ก ๋ณด์ด๋๋ฐ ์ด๊ฑธ ํ๋๋ก ๋ฌถ์ด์ ๊ด๋ฆฌํด ๋ณด๋๊ฑด ์ด๋จ๊น์ ?
<SongArticle>
<SongArticleName articleName={"TITLE"} />
<SongArticleItem articleName={"TITLE"} item={title} />
</SongArticle> |
@@ -0,0 +1,48 @@
+import React from "react";
+import styled from "styled-components";
+import { BiSearch } from "react-icons/bi";
+import useModal from "../../hooks/useModal";
+import SongSearchModal from "./SongSearchModal/SongSearchModal";
+
+const LetterEditorSearchButton = () => {
+ const [isOpened, onOpenModal, o... | Unknown | modal๊ณผ ๊ด๋ จ๋ ๋์์ custom hook์ผ๋ก ์ฌ์ฉํ ๋ถ๋ถ ์ข์ ๋ณด์
๋๋ค ! |
@@ -0,0 +1,108 @@
+import React from "react";
+import styled from "styled-components";
+import { BiSearch } from "react-icons/bi";
+import { useDispatch } from "react-redux";
+import { searchSong } from "../../../modules/song";
+
+const SearchForm = ({ onCloseModal }) => {
+ const dispatch = useDispatch();
+
+ const ... | Unknown | Form์ด ์ ์ ๋ ๋ณต์กํ ์ํ๋ฅผ ๊ฐ์ง๋ฉด ๊ด๋ฆฌ๊ฐ ์ฝ์ง ์์๋ฐ ๊ทธ๋ด๋
https://react-hook-form.com/
์์ ๊ฐ์ ๋๊ตฌ๋ฅผ ๋์
ํด ๋ณผ ์๋ ์์ต๋๋ค ใ
|
@@ -0,0 +1,24 @@
+import React from "react";
+import styled from "styled-components";
+
+const Footer = () => {
+ return (
+ <FooterBlock>
+ <p className="copyright">© Museop Kim</p>
+ </FooterBlock>
+ );
+};
+
+const FooterBlock = styled.div`
+ display: flex;
+ justify-content: center;
+ align-ite... | Unknown | ์ปดํฌ๋ํธ๋ฅผ ์ฌ์ฌ์ฉ ํ๋ฏ์ด ์คํ์ผ๋ ์ฌ๋ฌ ๊ณณ์ ์ฌ์ฌ์ฉ ํ๋ ๋ฐฉ๋ฒ์ด ์์๋ค์. `ThemeProvider`์ ๋ํด ์ ๋ชฐ๋๋๋ฐ ์ด๋ฒ ๊ธฐํ์ ํ๋ฒ ํ์ต ํด๋ณด๊ณ ํด๋ณผ ์ ์๋ค๋ฉด ์ ์ฉ๊น์ง ํด๋ณด๊ฒ ์ต๋๋ค! ์กฐ์ธ ํด์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค ๐ |
@@ -0,0 +1,47 @@
+import React from "react";
+import styled from "styled-components";
+import { Link } from "react-router-dom";
+
+const Navigation = () => {
+ return (
+ <NavigationBlock>
+ <Link to="/">์ ์ฒญ๊ณก</Link>
+ <Link to="/ranking">์ ์ฒญ๊ณก ์์</Link>
+ <Link to="/contents">์ ์ฒญ๊ณก ์ ํ๋ธ ์์</Link>
+ <L... | Unknown | ์ฒ์์๋ ๋ง์ ํ์ ๊ฒ์ฒ๋ผ px๊ณผ rem์ ๊ตฌ๋ถํด์ ์ฌ์ฉ ํ๋ค๊ฐ ์๋ ๊ฐ์ธ rem์ผ๋ก ๋จ์๋ฅผ ํต์ผํ๊ณ ์ ์ฉ ํ์ต๋๋ค. ํน์ ์ด๋ ๊ฒ ํ ๊ฒฝ์ฐ ์ฃผ์ํด์ผ ๋ ๊ณ ๋ ค์ฌํญ ๊ฐ์๊ฒ ์์๊น์? |
@@ -0,0 +1,147 @@
+import React from "react";
+import styled from "styled-components";
+
+const MAX_LENGTH = 100;
+
+const Letter = ({
+ id,
+ user,
+ song,
+ songStory,
+ createdDateTime,
+ onReadLetter
+}) => {
+ const { username, avatarUrl } = user;
+ const { title, artist, imageUrl } = song;
+
+ return (
+... | Unknown | ์ปดํฌ๋ํธ ์ด์ธ์ className์ ์ง์ ์ฌ์ฉํ ๋๋ ๋๋ถ๋ถ CSS ๋ค์ด๋ฐ ์ปจ๋ฒค์
์ผ๋ก ์๋ ค์ง `BEM` ์ ์ ์ฉ ํ์ต๋๋คใ
ใ
`-`๋ ๋ ๋จ์ด๋ฅผ ์ฐ๊ฒฐํด์ผ ํ ๋, `__`๋ ํน์ ๋ธ๋ญ์ ๊ตฌ์ฑํ๋ ํ์ ์์๋ฅผ ๊ตฌ๋ถํ ๋ ์ฌ์ฉ ํ๋ ๋ฏ ํ๋ค์.
[CSS BEM](https://css-tricks.com/bem-101/) ์ ์ฐธ๊ณ ํ์ต๋๋ค :) |
@@ -0,0 +1,29 @@
+import React from "react";
+import styled from "styled-components";
+import LetterContainer from "../../containers/Letter/LetterContainer";
+
+const LetterList = ({ letters }) => {
+ return (
+ <LetterListBlock>
+ {letters.map(letter => (
+ <LetterContainer
+ key={letter.id}
+... | Unknown | Container๋ฅผ ์ธ์ ์ฌ์ฉํด์ผ ํ ์ง ๋ช
ํํ ๊ธฐ์ค์ด ์์๋๋ฐ, ๋ฆฌ๋ทฐ ํด์ฃผ์ ๋ด์ฉ์ ๋ณด๊ณ ๊ณ ๋ฏผ ๋๋ ๊ฒ๋ค์ด ๋ง์ด ๋์ด์ง๋ ๋๋์ด์์.
๋ค์ ์์ ๋ ๋ฐ์ ํ๊ฒ ์ต๋๋ค ๐ |
@@ -0,0 +1,30 @@
+import React, { useEffect, useState } from "react";
+import ModalTemplate from "../Template/Modal/ModalTemplate";
+import LetterDetailsSong from "./LetterDetailsSong";
+import LetterDetailsSongStory from "./LetterDetailsSongStory";
+import LetterModalTemplate from "../Template/LetterModal/LetterModalT... | Unknown | ๊ฐ๋ฅํ๋ค๋ฉด ๊ฐ์ฒด ์์ฒด๋ฅผ ๋๊ธฐ๋ ๊ฒ์ด ์ฌ๋ฌ ์ธก๋ฉด์์ ๋ ์ข์๊ฑฐ ๊ฐ๋ค๋ ์๊ฐ์ด์๋๋ฐ, ์๋ ๊ฒฝ์ฐ๋ ์๊ฒ ๋ค๋ ์๊ฐ์ด ๋๋ค์!
์์ ํ ๋ ๋ฐ์ ํ๊ฒ ์ต๋๋ค ๐ |
@@ -0,0 +1,45 @@
+import React, { useEffect } from "react";
+import { MdMoreHoriz } from "react-icons/md";
+import styled, { css } from "styled-components";
+import LetterDetailsHiddenMenuButton from "./LetterDetailsHiddenMenuButton";
+
+const LetterDetailsHiddenMenu = ({
+ isMouseEnter,
+ isMenuOpen,
+ onToggle,
+ ... | Unknown | `display: none`์ DOM์ ์ํฅ์ ๋ฏธ์น์ง ์๋ ๋ฐ๋ฉด `visibility: hidden` ์ DOM์ ์ํฅ์ ์ฃผ๋ ๊ฒ์ผ๋ก ์๊ณ ์์์ด์ใ
ใ
`transition` ์ `display: none`์์ ์๋ํ์ง ์์์ `visibility` ์์ฑ์ ์ฌ์ฉํ๊ฒ ๋๋๋ฐ, ํน์ ์ปจ๋ฒค์
์ด ๋ฐ๋ก ์๋ค๊ฑฐ๋ ๋ ํจ์จ์ ์ธ ๋ฐฉ๋ฒ์ด ์์๊น์? |
@@ -0,0 +1,28 @@
+import React from "react";
+import LetterModalSong from "../LetterModal/LetterModalSong/LetterModalSong";
+import SongAbout from "../LetterModal/LetterModalSong/SongAbout";
+import SongArticle from "../LetterModal/LetterModalSong/SongArticle";
+import SongArticleItem from "../LetterModal/LetterModalSo... | Unknown | ์ปดํฌ๋ํธ๋ฅผ ์์ ํ ๋ค ๋ถ๋ฆฌ ํ ๋ค์ ํ๋ฒ ๋ ์ ๋ฆฌ๋ฅผ ํ์ด์ผ ํ๋๋ฐ ์ด๋ฐ ์ค๋ณต์ ๋ฌถ์ด์ ์ค์ด๋๊ฒ ์ข์๊ฑฐ ๊ฐ์์. ๋ฐ์ ํด๋ณด๊ฒ ์ต๋๋ค. ์๋ ค์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค! |
@@ -0,0 +1,108 @@
+import React from "react";
+import styled from "styled-components";
+import { BiSearch } from "react-icons/bi";
+import { useDispatch } from "react-redux";
+import { searchSong } from "../../../modules/song";
+
+const SearchForm = ({ onCloseModal }) => {
+ const dispatch = useDispatch();
+
+ const ... | Unknown | ์ง๊ธ ์ ๋์ ํผ ์ฌ์ฉ์์๋ ์ง์ ๊ตฌํ๋ ๋ฌด๋ฆฌ๊ฐ ์์์ง๋ง, ํผ์ด ๋ณต์กํด์ง๋ฉด ํ์คํ ๊ด๋ฆฌํ๊ธฐ๋ ์ฝ์ง ์์ ๋ฏ ํ๋๋ผ๊ตฌ์.
๊ธฐ์ต ํด๋์๋ค๊ฐ ํ์ํ ๋ ์ ์ฉ ํด๋ณด๊ฒ ์ต๋๋ค :) ์๋ ค์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค. |
@@ -0,0 +1,75 @@
+package bridge.controller;
+
+import bridge.BridgeRandomNumberGenerator;
+import bridge.constants.GameValue;
+import bridge.domain.Bridge;
+import bridge.domain.BridgeGame;
+import bridge.domain.BridgeMaker;
+import bridge.view.handler.InputHandler;
+import bridge.view.OutputView;
+
+public class Brid... | Java | ๋ค๋ฆฌ๋ฅผ ๋๋ฉด์ ์ด๋์ ๋ฐ๊ณ ์๋ ํํ๋ผ์,
์ด๋์ด ์คํจํด๋ ๋ฐ๋ก ์ฌ์๋ ์ฌ๋ถ๋ฅผ ๋ฌป์ง ์๊ณ , ๊ทธ๋ฅ ์งํ์ด ๋๋ ๊ฒ ๊ฐ์ต๋๋ค..! |
@@ -0,0 +1,75 @@
+package bridge.controller;
+
+import bridge.BridgeRandomNumberGenerator;
+import bridge.constants.GameValue;
+import bridge.domain.Bridge;
+import bridge.domain.BridgeGame;
+import bridge.domain.BridgeMaker;
+import bridge.view.handler.InputHandler;
+import bridge.view.OutputView;
+
+public class Brid... | Java | ์คํจํ๊ณ ์ฌ์๋๋ ์ข
๋ฃ๋ฅผ ์
๋ ฅํ์ ๋, ๊ฒ์์ด ์ข
๋ฃ๋์ง ์๊ณ ๊ณ์ ๋ค์ ์ด๋ ์
๋ ฅ์ ๋ฐ๋ ๊ฒ ๊ฐ์ต๋๋ค..!
์คํจํ๊ณ ์ฌ๊ธฐ๋ก ๋ค์ด์์ status๋ฅผ false๋ก ๋ฐ๊ฟ์ฃผ๋ ๋ถ๋ถ์ด ์์ด์์ธ ๊ฒ ๊ฐ์์! |
@@ -0,0 +1,75 @@
+package bridge.controller;
+
+import bridge.BridgeRandomNumberGenerator;
+import bridge.constants.GameValue;
+import bridge.domain.Bridge;
+import bridge.domain.BridgeGame;
+import bridge.domain.BridgeMaker;
+import bridge.view.handler.InputHandler;
+import bridge.view.OutputView;
+
+public class Brid... | Java | ์ด๋ํ์ ๋ X๊ฐ ๋์ค๋ฉด ์ฌ์์์ด ๋์์ผํ๋๋ฐ
์ด๊ฑฐ ์ ๊ฐ ๋ฌธ์ ๋ฅผ ์ ๋ชป์ดํดํ๋ค์ ใ
ใ
.. |
@@ -0,0 +1,75 @@
+package bridge.controller;
+
+import bridge.BridgeRandomNumberGenerator;
+import bridge.constants.GameValue;
+import bridge.domain.Bridge;
+import bridge.domain.BridgeGame;
+import bridge.domain.BridgeMaker;
+import bridge.view.handler.InputHandler;
+import bridge.view.OutputView;
+
+public class Brid... | Java | ๊ทธ๋ฌ๋ค์ ๋ถ๋ฆฌํ๊ธฐ์ ์๋ ์ ์๋์ํด์ ๋ฆฌํฉํ ๋ง๋จ๊ณ์์ ์ค์ํ๋๋ด
๋๋ค..
๋ง์ง๋ง์ ๋ค์ ํ๋ฒ ๊ผผ๊ผผํ ์ฒดํฌํด์ผ๊ฒ ๋ค์ ๐จ |
@@ -0,0 +1,14 @@
+package bridge.constants;
+
+public class GameValue {
+
+ private GameValue() {
+ }
+
+ public static final String MOVE_UP_COMMAND = "U";
+ public static final String MOVE_DOWN_COMMAND = "D";
+ public static final String RETRY_COMMAND = "R";
+ public static final String QUIT_COMMAND ... | Java | ๊ด๋ จ ์๋ ์์๋ผ๋ฆฌ Enum ์ผ๋ก ๋ฌถ์ด๋ด๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค :) |
@@ -0,0 +1,17 @@
+package bridge.constants;
+
+import java.util.regex.Pattern;
+
+public enum RegexPattern {
+ ONLY_NUMBER(Pattern.compile("\\d+"));
+
+ private final Pattern pattern;
+
+ RegexPattern(Pattern pattern) {
+ this.pattern = pattern;
+ }
+
+ public boolean matches(String value) {
+ ... | Java | Pattern ์์ฒด๋ฅผ Enum ์ผ๋ก ์ฌ์ฉํ๋ ๊ฒ์ ์๊ฐํด๋ณด์ง ๋ชปํ๋๋ฐ, ์ด๊ฑฐ ๊ฝค๋ ์ฌํ์ฉ์ฑ์ด ๋๊ฒ ๊ตฐ์ ๐ |
@@ -0,0 +1,75 @@
+package bridge.controller;
+
+import bridge.BridgeRandomNumberGenerator;
+import bridge.constants.GameValue;
+import bridge.domain.Bridge;
+import bridge.domain.BridgeGame;
+import bridge.domain.BridgeMaker;
+import bridge.view.handler.InputHandler;
+import bridge.view.OutputView;
+
+public class Brid... | Java | ์ด ๋ถ๋ถ์ ์ธ๋ดํธ๋ฅผ 1๋ก ๋ฆฌํฉํ ๋งํ๋ ๊ณ ํต์ค๋ฌ์ด(?) ๊ฒฝํ์ ํด๋ณด์
๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค!
์ ๋ ์ ๋ ๋ชป ์ค์ผ ๊ฒ ๊ฐ๋ ์ธ๋ดํธ๋ฅผ ์ค์ด๋ ค๊ณ ์ด๋ฆฌ์ ๋ฆฌ ๋นํ๋ค๋ณด๋(?) ๋ค์ํ ์ธ์ฌ์ดํธ๋ค์ด ๋ ์ค๋ฅด๋๋ผ๊ณ ์..! |
@@ -0,0 +1,82 @@
+package bridge.domain;
+
+import bridge.constants.GameValue;
+
+/**
+ * ๋ค๋ฆฌ ๊ฑด๋๊ธฐ ๊ฒ์์ ๊ด๋ฆฌํ๋ ํด๋์ค
+ */
+public class BridgeGame {
+
+ private int retryCount;
+ private MoveResult moveResult;
+
+ public BridgeGame(MoveResult moveResult, int retryCount) {
+ this.moveResult = moveResult;
+ ... | Java | ์ฌ๊ธฐ early return ์ด ๋น ์ง ๊ฒ ๊ฐ์์! |
@@ -0,0 +1,37 @@
+package bridge.domain;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class MoveResult {
+ private final List<String> upperBridge;
+ private final List<String> lowerBridge;
+
+ public MoveResult() {
+ this.upperBridge = new ArrayList<>();
+ this.lowerBridge = n... | Java | > ํต์ฌ ๋ก์ง์ ๊ตฌํํ๋ ์ฝ๋์ UI๋ฅผ ๋ด๋นํ๋ ๋ก์ง์ ๋ถ๋ฆฌํด ๊ตฌํํ๋ค.
์ด ๋ถ๋ถ์ ์๊ตฌ์ฌํญ์ด ์ง์ผ์ง์ง ์์ ๊ฒ ๊ฐ์ต๋๋ค.
ํ๋ฆฌ์ฝ์ค ๊ธฐ๊ฐ ๋์ ๊ฐ์ฅ ๋ง์ด ์๊ตฌ๋ ํ๋ก๊ทธ๋๋ฐ ๊ธฐ๋ฒ์ด๋ผ, ์ด ๋ถ๋ถ์ ๊ผญ ๋ฆฌํฉํ ๋ง ํด๋ณด์๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -0,0 +1,56 @@
+package bridge.view;
+
+import bridge.domain.BridgeGame;
+import bridge.domain.MoveResult;
+
+/**
+ * ์ฌ์ฉ์์๊ฒ ๊ฒ์ ์งํ ์ํฉ๊ณผ ๊ฒฐ๊ณผ๋ฅผ ์ถ๋ ฅํ๋ ์ญํ ์ ํ๋ค.
+ */
+public class OutputView {
+
+ public void printStartMessage() {
+ println("๋ค๋ฆฌ ๊ฑด๋๊ธฐ ๊ฒ์์ ์์ํฉ๋๋ค.");
+ }
+
+ public void printBridgeSizeInputMessage()... | Java | ํ์คํ ์ถ๋ ฅ์ฉ ๋ฉ์์ง๊ฐ ์ฌํ์ฉ๋๋ ๊ฒฝ์ฐ๊ฐ ์๋ค๋ณด๋, ์ด๋ ๊ฒ ํ๋ ์ฝ๋ฉํด๋ ๊ฝค๋ ์ง๊ด์ ์ด์์? ๋ผ๋ ๋๋์ ๋ฐ์์ต๋๋ค ๐ |
@@ -0,0 +1,42 @@
+package bridge.view.handler;
+
+import bridge.domain.Bridge;
+import bridge.domain.BridgeMaker;
+import bridge.view.ErrorView;
+import bridge.view.InputView;
+import java.util.function.Supplier;
+
+public class InputHandler {
+ private final InputView inputView;
+ private final ErrorView errorVi... | Java | (๊ถ๊ธํด์!)
๊ทธ๋์ ํ์ค๋๊ณผ ๋ฆฌ๋ทฐํด์ค๋ฉด์ ์ด๋ฐ ์ฌ์๋ ๋ก์ง์ while ๋ก ์ฒ๋ฆฌํ ๊น, ์ฌ๊ท๋ก ์ฒ๋ฆฌํ ๊น ๊ณ ๋ฏผํ๋ค๊ฐ ์ ๋ ์ฌ๊ท๋ฅผ ์ ํํ์ต๋๋ค.
๊ทธ๋ฐ๋ฐ ์ฌ๊ท๋ฅผ ์ ํํด๋ ํธ์ถ ๋์ค๊ฐ ๊น์ด์ง๋๊ฒ ์๋๊ณ ๋์ค๊ฐ 1๋ก ๊ณ์ ์ ์ง๋๋ ๊ฒ ๊ฐ๋๋ผ๊ณ ์. (์ด์ฐจํผ catch๋ฅผ ํ๊ณ ์๋ฌ๋ฉ์์ง๋ฅผ ์ถ๋ ฅ์ ํ๋ฏ๋ก)
ํ์ค๋์ ์ฌ๊ท ๋์ while์ ์ ํํ์ ์ด์ ๊ฐ ๊ถ๊ธํฉ๋๋ค :) |
@@ -0,0 +1,82 @@
+package bridge.domain;
+
+import bridge.constants.GameValue;
+
+/**
+ * ๋ค๋ฆฌ ๊ฑด๋๊ธฐ ๊ฒ์์ ๊ด๋ฆฌํ๋ ํด๋์ค
+ */
+public class BridgeGame {
+
+ private int retryCount;
+ private MoveResult moveResult;
+
+ public BridgeGame(MoveResult moveResult, int retryCount) {
+ this.moveResult = moveResult;
+ ... | Java | else๋ฌธ์ด ์๋๋ผ์ ์๋ฌด๋๋ return์ ์ถ๊ฐํด ๋ค์ ์กฐ๊ฑด์ ํ์ธํ์ง ์๋๋ก ํ๋๊ฒ ์ข๊ฒ ๋ค์ ! |
@@ -0,0 +1,37 @@
+package bridge.domain;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class MoveResult {
+ private final List<String> upperBridge;
+ private final List<String> lowerBridge;
+
+ public MoveResult() {
+ this.upperBridge = new ArrayList<>();
+ this.lowerBridge = n... | Java | ํ ๊ทธ ๋ถ๋ถ์ ๋์ณ๋ฒ๋ ธ๋ค์ ..
์ด๋ฒ 5๊ธฐ ์ต์ข
๊น์ง ์น๋ฉด์ ๋๋๊ฑด๋ฐ 5์๊ฐ์ด๋ผ๋ ์๊ฐ์ ์ฝ๋งค์ด์ง ์๊ณ
์ด๋ฐ์ ๊ธฐ๋ฅ ์๊ตฌ ์ฌํญ์ ๊ผผ๊ผผํ ๊ฒํ ํด์ผ ํ๋ค๋ ๊ฒ์ ๋ผ์ ๋ฆฌ๊ฒ ๋๊ผ์ต๋๋ค.. |
@@ -0,0 +1,42 @@
+package bridge.view.handler;
+
+import bridge.domain.Bridge;
+import bridge.domain.BridgeMaker;
+import bridge.view.ErrorView;
+import bridge.view.InputView;
+import java.util.function.Supplier;
+
+public class InputHandler {
+ private final InputView inputView;
+ private final ErrorView errorVi... | Java | ์ฌ๊ท ํธ์ถ๋ก ๊ตฌํํ์ ๋ ์ฝ๋๊ฐ ๊ฐ๊ฒฐํด์ง๋ค๋ ์ฅ์ ์ ๊ฐ์ง๊ณ ์์ง๋ง
ํ์ ๊น์ด๊ฐ ๊น์ด ์ง ๋ ์ํํ ๊ฒ์ด๋ผ ์๊ฐํ์ต๋๋ค.
์ ํธ๋ ๋ง์๋๋ก 1๋ก ์ ์ง๋๋ค๋ฉด ์ด ์ ์ ์๋ฌด๋๋ ์ ์ธํด์ผํ ๊ฒ ๊ฐ๋ค์
ํ์ง๋ง while๋ฌธ์ ์ฌ์ฉํ์ ๋ ๋ฐ๋ณต ํ์๋ฅผ ์ ์ดํ ์ ์๋ค๋ ์ฅ์ ๋ ์๊ธฐ์ while๋ฌธ์ ์ฌ์ฉํ์์ต๋๋ค.
์๋ฅผ ๋ค์ด์ ์ค์ ๋ก๊ทธ์ธ ์ ์ฑ
์ฒ๋ผ ์๋ชป๋ ๊ฐ์ 3ํ ๋๋ 5ํ ์
๋ ฅ ํ์ ๊ฒฝ์ฐ ์
๋ ฅ์ ์ข
๋ฃ ์ํจ๋ค๋๊ฐ ๋ฑ์ ์ํฉ๋ ์๊ฐํด๋ณด์์ต๋๋ค! |
@@ -0,0 +1,42 @@
+package bridge.view.handler;
+
+import bridge.domain.Bridge;
+import bridge.domain.BridgeMaker;
+import bridge.view.ErrorView;
+import bridge.view.InputView;
+import java.util.function.Supplier;
+
+public class InputHandler {
+ private final InputView inputView;
+ private final ErrorView errorVi... | Java | ํ์คํ **3ํ ๊น์ง๋ง ์ฌ์๋๊ฐ ๊ฐ๋ฅํ๋ค** ๋ผ๋ ๋ก์ง์ด ์์ ๊ฒฝ์ฐ์๋ while ๋ฌธ์ผ๋ก ์ฒ๋ฆฌํ๋๊ฒ ์ ์ฐํ๊ฒ ๋์ํ ์ ์๊ฒ ๋ค์!
์ธ์ฌ์ดํธ ๋ฐ๊ณ ๊ฐ๋๋ค :D |
@@ -1,9 +1,100 @@
-function Header(logo, searchBox) {
+import Input from './Input';
+import Button from './Button';
+import { handleSearch } from '../services/handleSeach';
+
+function Header({ logoSrc, logoAlt, onSearch }) {
const headerElement = document.createElement('header');
- headerElement.classList.add(... | JavaScript | ์ ๋ ์ด๋ฒคํธ์ ์ด๋ฆ์ด ์๋ฏธํ๋๊ฒ "ํ์์ ๋ฐ์" ์ด๋ผ๊ณ ์๊ฐํด์.
๊ฐ๋ น, `onChange` ๋ ์ค์ ๋ก change๊ฐ ์ผ์ด๋ฌ์ ๋์ด๊ณ , `onKeyDown` ์ ํค๋ฅผ ๋๋ ์ ๋ ์
๋๋ค.
`onSearch`๋ "๊ฒ์์ด ๋์์ ๋ ๋ฐ์" ์ธ๋ฐ, ์ด ์ปดํฌ๋ํธ์์ ์ค์ ๋ก "๊ฒ์"์ด๋ผ๋ ํ์๊ฐ ์ผ์ด๋ฌ๋ค๊ณ ํ ์ ์์๊น์?
์ง๊ธ์ "๊ฒ์"์ด๋ผ๋ ํ์๋ฅผ ๋ฐ์์ ์ฃผ์
ํด์ฃผ๊ณ , ์ด ์ปดํฌ๋ํธ ๋ด๋ถ์์ ์ผ์ด๋ ์ผ์ "์ํฐํค๋ฅผ ๋๋ ์" ์
๋๋ค.
์ฆ, ์ด๋ฒคํธ๋ "๊ฒ์ํ์ ๋ ๋ฐ์ํจ"์ ์ด์ผ๊ธฐํ๊ณ ์๋๋ฐ ๊ฒ์์ด๋ผ๋ ๊ธฐ๋ฅ์ ๋ฐ์์ ์ฃผ์
ํด์ค ์ ๋ฐ์ ์๋ ์ํฉ์ธ๊ฑฐ์ฃ . |
@@ -1,9 +1,100 @@
-function Header(logo, searchBox) {
+import Input from './Input';
+import Button from './Button';
+import { handleSearch } from '../services/handleSeach';
+
+function Header({ logoSrc, logoAlt, onSearch }) {
const headerElement = document.createElement('header');
- headerElement.classList.add(... | JavaScript | ์ด ๋ถ๋ถ๋ ๋์ผํฉ๋๋ค! |
@@ -1,9 +1,100 @@
-function Header(logo, searchBox) {
+import Input from './Input';
+import Button from './Button';
+import { handleSearch } from '../services/handleSeach';
+
+function Header({ logoSrc, logoAlt, onSearch }) {
const headerElement = document.createElement('header');
- headerElement.classList.add(... | JavaScript | ์ฌ๊ธฐ์ ์ฐ์ด๋ 390 ์ด๋ผ๋ ์ซ์๋ ์์๋ก ๋ง๋ค์ด์ ์ฌ์ฉํด์ฃผ๋ฉด ์ด๋จ๊น์!? |
@@ -1,9 +1,100 @@
-function Header(logo, searchBox) {
+import Input from './Input';
+import Button from './Button';
+import { handleSearch } from '../services/handleSeach';
+
+function Header({ logoSrc, logoAlt, onSearch }) {
const headerElement = document.createElement('header');
- headerElement.classList.add(... | JavaScript | ์ ๋ณด๋๊น ๋ก์ง์ด ๊ฑฐ์ ์ ์ฌํ๋ค์! |
@@ -0,0 +1,33 @@
+import handleMovie from '../services/handleMovie';
+import Button from './Button';
+
+function MainContent(initialPage) {
+ let page = initialPage;
+ const mainElement = document.createElement('main');
+ mainElement.id = 'main';
+
+ mainElement.innerHTML = `
+ <section class="item-v... | JavaScript | ```suggestion
const mainElement = html(`
<main id="main">
<section class="item-view">
<h2>์ง๊ธ ์ธ๊ธฐ ์๋ ์ํ</h2>
<ul class="item-list"></ul>
</section>
<main>
`);
```
์ด๋ ๊ฒ ํํํ ์ ์๋๋ก ํจ์๋ฅผ ํ๋ ๋ง๋ค์ด์ฃผ์๋ฉด ์ด๋จ๊น์!? |
@@ -0,0 +1,33 @@
+import handleMovie from '../services/handleMovie';
+import Button from './Button';
+
+function MainContent(initialPage) {
+ let page = initialPage;
+ const mainElement = document.createElement('main');
+ mainElement.id = 'main';
+
+ mainElement.innerHTML = `
+ <section class="item-v... | JavaScript | ์์์๋ html template์ผ๋ก ํํ๋๊ณ ์ฌ๊ธฐ์๋ ์ด๋ ๊ฒ ํํ๋๊ณ ์์ด์ ์ฝ๋๋ฅผ ์ฝ๋ ์ฌ๋ ์
์ฅ์์๋ ์กฐ๊ธ ํท๊ฐ๋ฆฌ์ง ์์๊น ์ถ์ด์! |
@@ -0,0 +1,47 @@
+import { BASE_URL } from '../constants/api';
+import { APIError } from '../apis/error';
+
+interface ApiClientType {
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE';
+ endpoint: string;
+ params?: Record<string, string>;
+ headers?: Record<string, string>;
+ body?: Record<string, any>;
+}
+... | TypeScript | ์ํ.. ์ด ํ์ผ ๋๋ฌธ์ tsconfig๊ฐ ์๊ธด๊ฑฐ์๊ตฐ์ |
@@ -0,0 +1,47 @@
+import { BASE_URL } from '../constants/api';
+import { APIError } from '../apis/error';
+
+interface ApiClientType {
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE';
+ endpoint: string;
+ params?: Record<string, string>;
+ headers?: Record<string, string>;
+ body?: Record<string, any>;
+}
+... | TypeScript | try ๊ตฌ๊ฐ์์ ์ค๋ฅ ๋ฐ์ -> catch๋ก ์ง์
-> ๋ฌด์กฐ๊ฑด status๋ 400์ผ๋ก ๊ณ ์ ํ์ฌ ๋ค์ error throw
์ด๋ ๊ฒ ๋ฉ๋๋ค.
์ ์๋ฏธํ ์๋ฌ ํ๋ก์ฐ์ผ๊น์~? |
@@ -0,0 +1,47 @@
+import { BASE_URL } from '../constants/api';
+import { APIError } from '../apis/error';
+
+interface ApiClientType {
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE';
+ endpoint: string;
+ params?: Record<string, string>;
+ headers?: Record<string, string>;
+ body?: Record<string, any>;
+}
+... | TypeScript | ๊ทธ๋ฐ๋ฐ ์ด ํ์ผ์ด ์ domain ์ ํด๋นํ๋๊ฑธ๊น์~?
domain์ด๋ผ๊ณ ํ๊ธฐ์ ๋ง ๊ทธ๋๋ก ์ฌ์ด๋ ์ดํํธ(client)๋ฅผ ํํํ๊ฑฐ๋ผ์... ์ ํ ์ฐ๊ด์ด ์์ด๋ณด์ฌ์! |
@@ -0,0 +1,24 @@
+import getMovieList from '../apis/getMovieList';
+import ConfirmModal from '../components/modal/ConfirmModal';
+import { Modal } from '../components/modal/container/Modal';
+import { NOT_MORE_MOVIES_MESSAGE } from '../constants/message';
+import renderMovies from '../view/renderMovies';
+import render... | JavaScript | api์์ ๋ฐ์ํ ์๋ฌ ์ค์ message๋ง ์ฌ์ฉํ๊ณ ์๋๋ฐ, CustomError๋ฅผ ๋ง๋ค์ด์ ์ฐ๋ ์๋ฏธ๊ฐ ์๋๊ฑด๊ฐ ์ถ์ด์! |
@@ -0,0 +1,47 @@
+import { BASE_URL } from '../constants/api';
+import { APIError } from '../apis/error';
+
+interface ApiClientType {
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE';
+ endpoint: string;
+ params?: Record<string, string>;
+ headers?: Record<string, string>;
+ body?: Record<string, any>;
+}
+... | TypeScript | domain์ด apis๋ฅผ ์ฐธ์กฐํ๋๊ฑด ์ด์ํด๋ณด์ฌ์! |
@@ -1,2 +1 @@
export const BASE_URL = 'https://api.themoviedb.org';
-export const IMAGE_BASE_URL = 'https://image.tmdb.org/t/p/w500'; | JavaScript | ์ด๋ฐ ์ ๋ณด๋ ์์ API๋ฅผ ์์ฒญํ๋ ์ชฝ์์ ๊ฐ์ง๊ณ ์์ผ๋ฉด ์ด๋จ๊น์? |
@@ -0,0 +1 @@
+export const NOT_MORE_MOVIES_MESSAGE = '๋์ด์ ์ํ๊ฐ ์กด์ฌํ์ง ์์ต๋๋ค.'; | JavaScript | ์ด๋ฐ ์๋ฌ ๋ฉ์ธ์ง๋ ๋ฉ์ธ์ง๋ฅผ ์ฌ์ฉํ๋ ์ชฝ์์ ๊ฐ์ง๊ณ ์์ผ๋ฉด ์ด๋จ๊น์?
๋ค๋ฅธ ๊ตฌ๊ฐ์์๋ ์์ ์ฌ์ฉ๋ ๊ฒ ๊ฐ์ง ์์์์! |
@@ -0,0 +1,40 @@
+package org.sopt.androidseminar1
+
+import android.content.Intent
+import androidx.appcompat.app.AppCompatActivity
+import android.os.Bundle
+import android.widget.Toast
+import org.sopt.androidseminar1.databinding.SignInBinding
+
+class SignInActivity: AppCompatActivity() {
+ private lateinit var ... | Kotlin | ์ฝํ๋ฆฐ์์๋ ํ์
์ถ๋ก ๊ธฐ๋ฅ์ ์ง์ํด์ฃผ๊ธฐ๋๋ฌธ์
```suggestion
val goSignup = Intent(this, SignUpActivity::class.java)
val goHomeActivity = Intent(this, HomeActivity::class.java )
```
์ด๋ ๊ฒ๋ง ์์ฑํ์
๋ ๊ด์ฐฎ์ต๋๋น~:) |
@@ -0,0 +1,40 @@
+package org.sopt.androidseminar1
+
+import android.content.Intent
+import androidx.appcompat.app.AppCompatActivity
+import android.os.Bundle
+import android.widget.Toast
+import org.sopt.androidseminar1.databinding.SignInBinding
+
+class SignInActivity: AppCompatActivity() {
+ private lateinit var ... | Kotlin | ์ฌ๊ธฐ์ toString()์ ๊ฒฝ์ฐ ๋นผ์ฃผ์
๋ ๊ด์ฐฎ์ต๋๋ค~!! |
@@ -0,0 +1,40 @@
+package org.sopt.androidseminar1
+
+import android.content.Intent
+import androidx.appcompat.app.AppCompatActivity
+import android.os.Bundle
+import android.widget.Toast
+import org.sopt.androidseminar1.databinding.SignInBinding
+
+class SignInActivity: AppCompatActivity() {
+ private lateinit var ... | Kotlin | ํ์ฌ setContentView ํจ์๊ฐ ๋๋ฒ ํธ์ถ๋๊ณ ์๋๋ฐ ํ๋๋ ์ง์์ฃผ์
๋ ๊ด์ฐฎ์ ๊ฒ ๊ฐ์์~!! |
@@ -0,0 +1,40 @@
+package org.sopt.androidseminar1
+
+import android.content.Intent
+import androidx.appcompat.app.AppCompatActivity
+import android.os.Bundle
+import android.widget.Toast
+import org.sopt.androidseminar1.databinding.SignInBinding
+
+class SignInActivity: AppCompatActivity() {
+ private lateinit var ... | Kotlin | ๋ชจ๋ ๋ก์ง์ ๋ค onCreate์ ๋ฃ๊ธฐ๋ณด๋ค๋ ๊ฐ๋
์ฑ, ์ฌ์ฌ์ฉ์ฑ ์ธก๋ฉด์ ๊ณ ๋ คํด์ ํจ์ํ๋ฅผ ํด์ฃผ์๋ ๊ฒ ์ข์ ๊ฒ ๊ฐ์์~!! |
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <corners android:radius="5dip"/>
+
+ <stroke android:width="2dp"
+ android:color="#F658A6"/>
+ <solid android:color="#F658A6"/>
+ <corners
+ android:topLeftRadius="1... | Unknown | dip๋ dp์ ๊ฐ์ ๊ฐ๋
์
๋๋ค! ์์น๋ฅผ dp๋ก ๋ฐ๊ฟ์ฃผ๋๊ฒ ์ข์ ๊ฒ ๊ฐ์์~!!! |
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+... | Unknown | View ์ปดํฌ๋ํธ์ id ๊ฐ์ ๋ค์ด๋ฐ์ ์ข ๋ ๊ธฐ๋ฅ์ ๋ง๊ฒ~~ ๊ตฌ์ฒด์ ์ผ๋ก ๋ค์ด๋ฐ ํ๋ ๊ฒ ์ข์ ๊ฒ ๊ฐ์์~!! |
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+... | Unknown | ๊ณ ์ dp๋ฅผ ๋์ด๋ ๋๋น๊ฐ์ผ๋ก ์ค ๊ฒฝ์ฐ ํด๋ํฐ ๊ธฐ์ข
์ ๋ฐ๋ผ ๋ด์ฉ์ด ์๋ฆด์๋์๊ณ , ๋ชจ์์ด ์ด์ํ๊ฒ ๋์ฌ ์๋ ์์ต๋๋ค~ ํน์ ๊ณ ์ dp๋ฅผ ๋์ด ๊ฐ์ผ๋ก ์ฃผ์ ํน๋ณํ ์ด์ ๊ฐ ์์๊น์~๐๐ |
@@ -0,0 +1,5 @@
+package model;
+
+public interface State {
+ int execute(int length);
+} | Java | ํ์ฅ ๊ฐ๋ฅ์ฑ์ ์๊ฐํ์ฌ ์ธํฐํ์ด์ค๋ฅผ ๊ตฌํํ์๋ค์!! ๊ฐ ๋ค๋ฅธ ์ํ๋ง๋ค ๊ฐ์ฒด๋ฅผ ๋ง๋ค์ด์ Car์์ ๊ฐ์๋ผ์ฐ๋ ๊ฒ๋ ์ ์ ํฉ๋๋ค!! State ํจํด ์ข์ ๊ฒ ๋ฐฐ์๊ฐ๋๋ค ๐ |
@@ -0,0 +1,13 @@
+package function;
+
+import java.util.Random;
+
+public class RandomNumberMaker {
+
+ private static final Random random = new Random();
+ private static final int RANDOM_NUMBER_RANGE = 10;
+
+ public static int getRandomNumber() {
+ return random.nextInt(RANDOM_NUMBER_RANGE);
+ }
+... | Java | getRandomNumber ๊ฐ ํธ์ถ๋ ๋๋ง๋ค ์๋ก์ด Random๊ฐ์ฒด๊ฐ ๋ง๋ค์ด์ง์ง ์์๋ ๋ ๊ฒ ๊ฐ์์!!
๊ทธ๋ฆฌ๊ณ Random๊ฐ์boundary๋ฅผ ํ๋ผ๋ฏธํฐ๋ก ๋ฐ์ ์ด์ ๊ฐ ์์๊น์?? |
@@ -2,22 +2,28 @@
public class Car{
- private String name;
- private int position = 0;
+ long number;
+ int length;
+ State state;
- public Car(String name){
- this.name = name;
+ public Car(long number) {
+ this.number = number;
+ length = 0;
}
- public String... | Java | number๋ฅผ Car๋ฅผ ์๋ณํด์ฃผ๋ ๋ฉค๋ฒ๋ก ์ฌ์ฉํ๊ณ ์๋ ๊ฒ ๊ฐ์์!! ์ ๊ทผ์ง์ ์์ final ํค์๋๋ฅผ ๋ถ์ฌ์ฃผ๋ ๊ฒ์ ๋ํด ์ด๋ป๊ฒ ์๊ฐํ์ค๊น์? |
@@ -1,21 +1,18 @@
package view;
-import controller.RacingGame;
import model.Car;
-import java.util.Collections;
import java.util.List;
public class ResultView {
- public static void printTrialResult(List<Car> cars){
- for (Car car : cars){
- System.out.print(car.getName() + " : " + Stri... | Java | ํ์ฌ ์ถ๋ ฅํ๋ ์ฉ๋๋ก ์ง๊ธ --- ์ด๋ ๊ฒ ๋ณด์ฌ์ฃผ๊ณ ์์ง๋ง, ๋์ค์๋ ๋ค๋ฅธ ๊ธฐํธ๋ก ๋ฐ๋์๋ ์์ ๊ฒ ๊ฐ์์!! ์ด ๊ธฐํธ๋ค ๋ฟ๋ง ์๋๋ผ InputView์ ResultView์ ์
์ถ๋ ฅ ๋ฉ์ธ์ง, ๋งค์ง๋๋ฒ๋ค์ ์์ํ ํด์ฃผ๋ฉด ์ข์ ๊ฒ ๊ฐ์์ |
@@ -0,0 +1,38 @@
+package controller;
+
+import function.RandomNumberMaker;
+import model.Car;
+import model.State;
+import model.Movable;
+import model.UnMovable;
+
+import java.util.List;
+
+public class CarController {
+
+ private static final int MOVE_CONDITION = 4;
+
+ public void registerCars(List<Car> cars... | Java | ์ ์ฒด์ ์ผ๋ก Car๋ค์ ๊ด๋ฆฌํด์ฃผ๋ ์ญํ ์ ํ๊ณ ์๋ ๊ฒ ๊ฐ์์!
์ ๊ฐ ์๊ฐํ๋ Controller์ ์ญํ ๊ณผ๋ ์กฐ๊ธ ๋ค๋ฅด๋ค๊ณ ์๊ฐ์ด ๋ญ๋๋ค.
์ ๊ฐ ์๊ฐํ๋ Controller์ ์ญํ ์ ์ฌ์ฉ์๊ฐ ์
๋ ฅํ ์์ฒญ๊ฐ์ ๋ฐ์, ์์ฒญ๊ฐ์ ๊ฐ์ง๊ณ ๋น์ฆ๋์ค ๋ก์ง์ ์คํํ๊ณ ํ์ํ ๋ฐ์ดํฐ๋ฅผ ๊ฐ๊ณตํด์ View์๊ฒ ๋ณด๋ด์ฃผ๋ ์ญํ ์ด๋ผ๊ณ ์๊ฐ์ ํฉ๋๋ค.
์ ๋ CarController๋ณด๋ค Cars๊ฐ์ ์ด๋ฆ์ด ๋ ์ด์ธ๋ฆฐ๋ค๊ณ ์๊ฐ์ด ๋๋๋ฐ ํ์ฐ๋์ ์ด๋ป๊ฒ ์๊ฐํ์ค๊น์??
์ด ์๋ฃ ์ฐธ๊ณ ํ์๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค!
https://tecoble.techcourse.co.kr/post/2020-... |
@@ -0,0 +1,47 @@
+package engine;
+
+import controller.CarController;
+import model.Car;
+import view.InputView;
+import view.ResultView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class RacingGame {
+
+ private List<Car> cars;
+ private CarController carController;
+ private InputView in... | Java | InputView๋ ์ธ์คํด์ค๋ก ๊ด๋ฆฌํ๊ณ ResultView๋ ์ ํธ๋ฆฌํฐ ํด๋์ค๋ก ์ ์ธํ ์ด์ ๊ฐ ๊ถ๊ธํ๋ค์!! ์ ๋ View๋ฅผ ๊ตฌํ์ ํ ๋, ๊ณ ๋ฏผ์ด ๋ง์ด ๋๋๋ฐ์! View ๊ฐ์ ๊ฒฝ์ฐ์ ์ํ๊ฐ ์์ด์ ์ ํธ๋ฆฌํฐ ํด๋์ค๋ก ๊ตฌํ์ ํด๋ ๋ ๊ฒ ๊ฐ์ง๋ง, ์ ํธ์ฑ ํด๋์ค์๋ ์๊น์ด ์กฐ๊ธ ๋ค๋ฅธ ๋๋๋ ์์ด์์!! ์ ๋ต์ ์๊ฒ ์ง๋ง, ์ ๋ ์ด๋ฒ์ View ๊ตฌํ์ ํ ๋ ์ฑ๊ธํด ํจํด์ ์ฌ์ฉํด๋ณด์์ด์!! ํ์ฐ๋์ด InputView์ OutputView๋ฅผ ๋ค๋ฅด๊ฒ ๊ตฌํํ์ ์ด ๊ถ๊ธํ๋ค์! |
@@ -0,0 +1,38 @@
+package controller;
+
+import function.RandomNumberMaker;
+import model.Car;
+import model.State;
+import model.Movable;
+import model.UnMovable;
+
+import java.util.List;
+
+public class CarController {
+
+ private static final int MOVE_CONDITION = 4;
+
+ public void registerCars(List<Car> cars... | Java | ๋๋ค๊ฐ ๋๋ฌธ์ checkMoveOrStop ๋ฉ์๋๋ฅผ ํ
์คํธ ์ฝ๋ ์์ฑํ๊ธฐ ์ด๋ ค์ ์ ๊ฑฐ์์!!
https://tecoble.techcourse.co.kr/post/2020-05-07-appropriate_method_for_test_by_parameter/
https://tecoble.techcourse.co.kr/post/2020-05-17-appropriate_method_for_test_by_interface/
์๋ฃ ์ฐธ๊ณ ํ์๋ฉด ์ข์ ๊ฒ ๊ฐ์์!! ํ์ง๋ง ์ธํฐํ์ด์ค๋ฅผ ๋ถ๋ฆฌํ๋๊ฒ ๋ฌด์กฐ๊ฑด ์ข์ ๋ฐฉ๋ฒ์ ์๋๋ผ๊ณ ์๊ฐ์ด ๋ญ๋๋ค!! ์์ฌํ๋ฉด์ ๋ณด๋ฉด ์ข์ ๊ฒ ๊ฐ์์!! ... |
@@ -0,0 +1,13 @@
+package function;
+
+import java.util.Random;
+
+public class RandomNumberMaker {
+
+ private static final Random random = new Random();
+ private static final int RANDOM_NUMBER_RANGE = 10;
+
+ public static int getRandomNumber() {
+ return random.nextInt(RANDOM_NUMBER_RANGE);
+ }
+... | Java | 1. getRandomNumber ๊ฐ ํธ์ถ๋ ๋๋ง๋ค ์๋ก์ด Random๊ฐ์ฒด๊ฐ ๋ง๋ค์ด์ง์ง ์์๋ ๋ ๊ฒ ๊ฐ์์!!
๋๊ฑด๋ ๋ง์๋๋ก getRandomNumber๋ฅผ ํธ์ถํ ๋๋ง๋ค Random ๊ฐ์ฒด๋ฅผ ๋ง๋ค์ง ์๋ ๊ฒ์ด ์ข๋ค๊ณ ์๊ฐ์ด ๋ญ๋๋ค
Random๊ฐ์ฒด๋ฅผ ์ฑ๊ธํค ํจํด์ ์ด์ฉํ์ฌ ๊ตฌํํ๋ฉด ๋ฆฌ์์ค ๋ถ๋ถ์์ ๋ญ๋น๋ฅผ ์ค์ผ ์ ์์ ๊ฒ ๊ฐ์ต๋๋ค!! :)
2. Random๊ฐ์ boundary๋ฅผ ํ๋ผ๋ฏธํฐ๋ก ๋ฐ์ ์ด์ ๊ฐ ์์๊น์??
์ ๊ฐ ์๊ฐํ๊ธฐ์๋ ๋์ค์ 10์์ ๋ค๋ฅธ ์ซ์๋ก ๋ฐ๊พธ๊ณ ์ถ์ "๋ณ๊ฒฝ ์ฌํญ"์ ์๊ฐํด๋ดค์ต๋๋ค.
์ฐจ๋ฅผ ์์ง์ด๊ฒ ํ๋ "CarController... |
@@ -0,0 +1,13 @@
+package function;
+
+import java.util.Random;
+
+public class RandomNumberMaker {
+
+ private static final Random random = new Random();
+ private static final int RANDOM_NUMBER_RANGE = 10;
+
+ public static int getRandomNumber() {
+ return random.nextInt(RANDOM_NUMBER_RANGE);
+ }
+... | Java | ```java
private static Random random = new Random();
private static final int RANDOM_BOUNDARY = 10;
public static int getRandomNumber() {
return random.nextInt(RANDOM_BOUNDARY);
}
```
์ด๋ผ๊ณ ํด์ค ์ ์์ ๊ฒ ๊ฐ์์์!!
๋๋ค ๊ฐ์ ์์ฑํด์ฃผ๋ ์ญํ ์ ํ๋ ๊ฒ ๊ฐ์๋ฐ, ๋๋ค๊ฐ์ ๋ฒ์๋ ๋๋ค๊ฐ์ด ์์ฑํด์ฃผ๋ ๊ณณ์์ ์์์ผ ํ์ง ์์๊น ์ถ๋ค์! |
@@ -0,0 +1,13 @@
+package function;
+
+import java.util.Random;
+
+public class RandomNumberMaker {
+
+ private static final Random random = new Random();
+ private static final int RANDOM_NUMBER_RANGE = 10;
+
+ public static int getRandomNumber() {
+ return random.nextInt(RANDOM_NUMBER_RANGE);
+ }
+... | Java | "๋๋ค๊ฐ์ ๋ฒ์๋ ๋๋ค๊ฐ์ด ์์ฑํด์ฃผ๋ ๊ณณ์์ ์์์ผ ํ์ง ์์๊น ์ถ๋ค์"
์ด ๋ถ๋ถ์ด ๋ง๋ ๊ฒ ๊ฐ์ต๋๋ค. ์๊ฐํด๋ณด๋ CarController๊ฐ ๋๋ค๊ฐ์ ๋ฒ์๋ฅผ ์ ํ๋ค๋ฉด ๊ฒฐ๊ตญ Random๊ฐ์ ์์ฑํด์ฃผ๋ ๊ณณ์ ์์กดํ๊ฒ ๋์ด ๊ฒฐํฉ๋๊ฐ ๋์์ง๊ฒ ๋ค์!!
๊ฒฐํฉ๋๋ฅผ ์ค์ด๋ ๋ฐฉ๋ฒ ๋๋ฌด ์ข์ต๋๋ค ๊ฐ์ฌํฉ๋๋ค! |
@@ -0,0 +1,5 @@
+package model;
+
+public interface State {
+ int execute(int length);
+} | Java | ๊ฐ์ฌํฉ๋๋ค :) |
@@ -1,16 +1,54 @@
package view;
+import java.io.InputStream;
+import java.util.InputMismatchException;
import java.util.Scanner;
-public class InputView{
+public class InputView {
- public static String[] inputCarName(Scanner scanner){
- System.out.println("๊ฒฝ์ฃผํ ์ฐจ์ ์ด๋ฆ์ ์
๋ ฅํ์ธ์. (์ด๋ฆ์ ์ผํ(,) ๊ธฐ์ค์ผ๋ก ๊ตฌ๋ถ)");
- ... | Java | ์์๊ฐ ์
๋ ฅ๋์ ๊ฒฝ์ฐ์ ์์ธ๊ฐ ๋์ ธ์ง๋๋ก ์ฒ๋ฆฌ๋ฅผ ํด์ฃผ์
จ๋ค์! ์์์ผ ๊ฒฝ์ฐ ๋ง๊ณ ๋ ์ซ์๊ฐ ์๋ ๊ฐ์ด ์
๋ ฅ ๋์ ๊ฒฝ์ฐ๋ ์์ธ๊ฐ ๋์ ธ์ง๋๋ก ๋ช
์์ ์ผ๋ก ์ฒ๋ฆฌํด์ฃผ๋ฉด ๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -1,16 +1,54 @@
package view;
+import java.io.InputStream;
+import java.util.InputMismatchException;
import java.util.Scanner;
-public class InputView{
+public class InputView {
- public static String[] inputCarName(Scanner scanner){
- System.out.println("๊ฒฝ์ฃผํ ์ฐจ์ ์ด๋ฆ์ ์
๋ ฅํ์ธ์. (์ด๋ฆ์ ์ผํ(,) ๊ธฐ์ค์ผ๋ก ๊ตฌ๋ถ)");
- ... | Java | ์ ๋ ๋๊ฑด๋๊ป ๋ฐฐ์ด๊ฑด๋ฐ if๋ฌธ ๋ฐ๋๊ฐ ํ ๋ฌธ์ฅ์ด๋๋ผ๋ ์ค๊ดํธ {}๋ฅผ ์ฌ์ฉํด์ฃผ๋๊ฒ์ด ๊ด๋ก๋ผ๊ณ ํ๋ค์! |
@@ -2,22 +2,28 @@
public class Car{
- private String name;
- private int position = 0;
+ long number;
+ int length;
+ State state;
- public Car(String name){
- this.name = name;
+ public Car(long number) {
+ this.number = number;
+ length = 0;
}
- public String... | Java | ์ ๊ทผ์ ํ์๋ ๊ฐ๋ฅํ ๊ฐ์ฅ ์ข์ ๋ฒ์๋ก ์ ์ธํด์ฃผ๋๊ฒ์ด ์ข๋ค๊ณ ํฉ๋๋ค. number, length, state ๊ฐ์ ๊ฒฝ์ฐ์๋ private๋ก ์ ์ธํด์ฃผ๋ฉด ์ด๋จ๊น์? |
@@ -0,0 +1,38 @@
+package controller;
+
+import function.RandomNumberMaker;
+import model.Car;
+import model.State;
+import model.Movable;
+import model.UnMovable;
+
+import java.util.List;
+
+public class CarController {
+
+ private static final int MOVE_CONDITION = 4;
+
+ public void registerCars(List<Car> cars... | Java | RANDOM_NUMBER_RANGE ๋ ์ด๋จ๊น์? |
@@ -1,66 +0,0 @@
-package controller;
-
-import model.Car;
-import util.RandomGenerator;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-public class RacingGame {
-
- public static final int CRITICAL_POINT = 5;
- public static final int MAX_NAME_LENGTH = 5;
-
- public v... | Java | ๋ฉ์๋๋ช
์ ํ์๋ฅผ ํํํ๋ ๋์ฌ๋ก ์์ํ๋๊ฒ ์ด๋จ๊น์? |
@@ -1,66 +0,0 @@
-package controller;
-
-import model.Car;
-import util.RandomGenerator;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-public class RacingGame {
-
- public static final int CRITICAL_POINT = 5;
- public static final int MAX_NAME_LENGTH = 5;
-
- public v... | Java | check ๋ ๋ฌด์์ ์ฒดํฌํ๋ค๋๊ฑด์ง ์๊ธฐ ์ด๋ ค์ด ๊ฒ ๊ฐ์์~ ๋ด๋ถ์์๋ง ํ์ฉ๋๋ ํด๋์ค๋ฉด private ํค์๋๋ฅผ ๋ถ์ด๊ณ ๋ฉ์๋๋ช
์ ์ข ๋ ํ์ด์จ๋ณด๋ฉด ์ด๋จ๊น์? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.