Skip to content

Comments

[BE] λ‚˜μ•„μ—° πŸ‘†μ—…λ‹€μš΄#1

Open
ay-eonii wants to merge 26 commits intoLeets-Official:ay-eoniifrom
ay-eonii:main
Open

[BE] λ‚˜μ•„μ—° πŸ‘†μ—…λ‹€μš΄#1
ay-eonii wants to merge 26 commits intoLeets-Official:ay-eoniifrom
ay-eonii:main

Conversation

@ay-eonii
Copy link
Member

@ay-eonii ay-eonii commented Apr 17, 2024

λ―Έμ…˜ μ‹€ν–‰ κ²°κ³Ό

ν…ŒμŠ€νŠΈ
image

μ‹€ν–‰ 터미널
숫자.ver
image
μ˜μ–΄.ver
image

좔가사항

pr μ˜¬λ¦¬λ©΄μ„œ λ³΄λ‹ˆ μ‹œλ„ 횟수λ₯Ό κ΅¬ν˜„ν•˜μ§€ μ•Šμ•˜λ„€μš” μΆ”κ°€ν•˜κ² μŠ΅λ‹ˆλ‹€

κΈ°λŠ₯ λͺ…μ„Έμ„œ

버전

  • 숫자 버전은 1λ²ˆμ΄λ‹€.
  • μ˜μ–΄ 버전은 2λ²ˆμ΄λ‹€.

λ‚œμˆ˜

  • 숫자 버전은 1 ~ 100 μ‚¬μ΄μ˜ 정닡을 κ°€μ§„λ‹€.
  • μ˜μ–΄ 버전은 A ~ z μ‚¬μ΄μ˜ 정닡을 κ°€μ§„λ‹€.

μ •λ‹΅

  • μΆ”μΈ‘κ°’κ³Ό 정닡을 λΉ„κ΅ν•œλ‹€.
  • κ²Œμž„ μƒνƒœλ₯Ό λ°˜ν™˜ν•œλ‹€.

κ²Œμž„ μƒνƒœ

  • 좔츑값이 정닡보닀 μž‘μ€ 경우 UP μƒνƒœμ΄λ‹€.
  • 좔츑값이 정닡보닀 큰 경우 DOWN μƒνƒœμ΄λ‹€.
  • 좔츑값이 μ •λ‹΅κ³Ό μΌμΉ˜ν•˜λŠ” 경우 CORRECT μƒνƒœμ΄λ‹€.

μ‹œλ„ 횟수

  • μ‚¬μš©μžκ°€ 정닡을 맞좜 λ•ŒκΉŒμ§€ μ‹œλ„ν•œ 횟수λ₯Ό 좜λ ₯ν•œλ‹€
    • 잘λͺ»λœ κ°’ μž…λ ₯ μ—­μ‹œ μ‹œλ„ν•œ νšŸμˆ˜μ— 포함 λ˜μ–΄μ•Ό ν•œλ‹€.

ay-eonii added 26 commits April 13, 2024 16:08
@ay-eonii ay-eonii self-assigned this Apr 17, 2024
@ay-eonii ay-eonii requested review from KoungQ and taeseokyang April 20, 2024 06:08
Copy link
Member

@KoungQ KoungQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제 μƒκ°μœΌλ‘œ 도움을 λ“œλ¦΄ 수 있으면 μ’‹κ² λ‹€ μ‹Άμ–΄μ„œ μ½”λ“œ λ°›μ•„μ„œ ν•˜λ‚˜μ”© λ΄€λŠ”λ° 였히렀 μ œκ°€ λ§Žμ€ 도움을 받은 것 κ°™λ„€μš”..
아직 객체에 많이 μ„œνˆ¬λ₯Έ μ œκ°€ 봐선 μ–΄λŠ 뢀뢄이 μ•„μ‰¬μš΄μ§€λŠ” νŒλ³„ν•˜κΈ° μ–΄λ €μ› μ§€λ§Œ ν•˜λ‚˜μ”© λœ―μ–΄ 읽어봀을 땐 λͺ¨λ‘ μ—­ν•  μ±…μž„ 뢄배와 쑴재 μ΄μœ κ°€ ν™•μ‹€ν•˜κ³  읽기 νŽΈν•˜λ„€μš”
μ½μœΌλ©΄μ„œ κ³΅λΆ€ν•˜λŠ” λŠλ‚Œμ΄μ—ˆμŠ΅λ‹ˆλ‹€ κ°μ‚¬ν•©λ‹ˆλ‹€ :)

- [x] μΆ”μΈ‘κ°’κ³Ό 정닡을 λΉ„κ΅ν•œλ‹€.
- [x] κ²Œμž„ μƒνƒœλ₯Ό λ°˜ν™˜ν•œλ‹€.

**κ²Œμž„ μƒνƒœ**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λ‹€λ₯Έ λΆ„λ“€ ν•˜μ‹ κ±° λ³΄λ‹ˆκΉ μΆ”μΈ‘ 값이 정닡보닀 ν¬κ±°λ‚˜ μž‘μ€ 경우 κ·Έ 값을 μ œμ™Έν•œ λ²”μœ„λ‘œ μ§€μ •ν•˜λŠ”κ²Œ λ§žλ‹€κ³  μƒκ°ν–ˆμ–΄μš”
예λ₯Όλ“€μ–΄ λ§Œμ•½ μ‚¬μš©μžκ°€ aλ₯Ό μž…λ ₯ν–ˆλ”λ‹ˆ UP이면 λ²”μœ„κ°€ b~z둜 지정될 수 μžˆλ„λ‘ λ§μ΄μ—μš”..!
κ·Έλ ‡μ§€ μ•ŠμœΌλ©΄ μ˜λ„μ μœΌλ‘œ λ¬΄ν•œνžˆ κ²Œμž„μ„ μ§„ν–‰ν•  μˆ˜λ„ μžˆμ„κ±°κ³ , μ—…λ‹€μš΄ κ²Œμž„ κΈ°λ³Έ 원칙이 μž…λ ₯ 값을 μ œμ™Έν•œ λ²”μœ„ μ€‘μ—μ„œ μ„ νƒν•˜λŠ”κ±°λΌκ³  μƒκ°ν•©λ‹ˆλ‹€

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

쒋은 μ§€μ μ΄μ—μš”! 사싀 κ΅¬ν˜„ν•˜λ‹€ λ†“μΉœ λΆ€λΆ„μž…λ‹ˆλ‹€γ…‹γ…‹γ…‹πŸ₯²

κ°μ‚¬ν•΄μš” ☺️

private final Scanner scanner = new Scanner(System.in);

public int readGuessNumberInRange(int start, int end) {
System.out.print(String.format(GUESS_NUMBER_FORMAT, start, end));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String.format을 μ“°μ§€ μ•Šμ•„λ„ λ™μž‘ν•˜λŠ”λ° μ“΄ μ΄μœ κ°€ λ”°λ‘œ μžˆμ„κΉŒμš”?!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이전에 + μ—°μ‚°μžκ°€ μ„±λŠ₯이 μ’‹μ§€ μ•Šλ‹€λŠ” 글을 λ³Έ 적 μžˆλŠ”λ°, λ‹€μ‹œ μ°Ύμ•„λ³΄λ‹ˆ μžλ°” 8 μ΄μƒμœΌλ‘œλŠ” +μ—°μ‚°μžλ„ μ΅œμ ν™”λ˜μ–΄ μ„±λŠ₯이 쒋은 것 κ°™λ„€μš” ^^..

ν•˜μ§€λ§Œ μ €λŠ” +μ—°μ‚°μžλ³΄λ‹€ 좜λ ₯ 포맷을 ν•œ λ²ˆμ— μƒμˆ˜λ‘œ κ΄€λ¦¬ν•˜λŠ” 게 μœ μ§€λ³΄μˆ˜μ— νŽΈν•  것 κ°™μ•„ String.format의 μž₯점이 더 크게 μ™€λ‹Ώλ„€μš”γ…‹γ…‹γ…‹ κ·Έλž˜μ„œ μ•„μ§κΉŒμ§€λŠ” String.format()을 μ• μš©ν•  것 κ°™μ•„μš” πŸ˜‚

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•„μ•„ + λŒ€μ‹  μ‚¬μš©ν•˜μ…¨λ˜κ±°κ΅°μš”..!
근데 μ €λŠ” 이미 μƒμˆ˜λ‘œ 포멧 잘 ν•΄λ‘μ‹ κ±°κ°™μ•„μ„œ printfλ₯Ό μ‚¬μš©ν•œλ‹€λ©΄ , λ§ŒμœΌλ‘œλ„ 좜λ ₯이 κ°€λŠ₯ν•œκ±Έ λ§μ”€λ“œλ €λ΄€μŠ΅λ‹ˆλ‹€..!
ex) System.out.printf(GUESS_NUMBER_FORMAT, start, end);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

질문이 λͺ¨ν˜Έν–ˆλ„€μš” μ£„μ†‘ν•©λ‹ˆλ‹€ γ…œγ…œ
저도 μ•žμœΌλ‘œ + λŒ€μ‹  String.format을 μ• μš©ν•΄λ³Όκ²Œμš”! :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•— κ·Έλ ‡κ΅°μš”!! printf둜 λ‘λŠ” 게 더 깔끔할 λ“― ν•΄μš” κ°μ‚¬ν•©λ‹ˆλ‹€πŸ˜Š

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants