Skip to content

Commit 85810b1

Browse files
authored
Merge pull request #28 from Nexters/dev
닉네임 최대 글자 제한
2 parents af9bcb1 + 835c13c commit 85810b1

File tree

1 file changed

+4
-3
lines changed
  • src/main/java/donmani/donmani_server/user/entity

1 file changed

+4
-3
lines changed

src/main/java/donmani/donmani_server/user/entity/User.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ public class User {
2323
private int level;
2424

2525
public static String generateRandomUsername() {
26-
String[] adjectives = {"기쁜", "슬픈", "화난", "즐거운", "부끄러운", "당황한", "설레는", "외로운", "초조한", "뿌듯한", "시원한", "우울한", "황홀한", "씁쓸한", "의기양양한", "서운한", "후련한", "억울한", "두근거리는", "운이 좋은"};
27-
String[] animals = {"고양이", "강아지", "호랑이", "사자", "여우", "늑대", "토끼", "다람쥐", "판다", "코끼리", "원숭이", "곰", "독수리", "올빼미", "수달", "두더지", "너구리", "고슴도치", "하마", "피카츄"};
26+
String[] adjectives = {"기쁜", "활발한", "멋있는", "즐거운", "당황한", "설레는", "귀여운", "뿌듯한", "시원한", "황홀한"};
27+
String[] animals = {"고양이", "강아지", "호랑이", "사자", "여우", "늑대", "토끼", "다람쥐", "판다", "코끼리", "원숭이", "곰", "독수리", "올빼미", "수달", "두더지", "너구리", "하마", "피카츄"};
2828

29-
return adjectives[(int) (Math.random() * adjectives.length)] + " " + animals[(int) (Math.random() * animals.length)];
29+
// 최대 여섯글자까지
30+
return adjectives[(int) (Math.random() * adjectives.length)] + animals[(int) (Math.random() * animals.length)];
3031
}
3132
}

0 commit comments

Comments
 (0)