Skip to content

Charlie.woo#197

Open
wooiron wants to merge 10 commits intonext-step:mainfrom
wooiron:charlie.woo
Open

Charlie.woo#197
wooiron wants to merge 10 commits intonext-step:mainfrom
wooiron:charlie.woo

Conversation

@wooiron
Copy link

@wooiron wooiron commented Feb 7, 2026

No description provided.

charlie.woo added 10 commits January 28, 2026 18:06
Adds the ability to generate a unique 3-digit number for the game.
The numbers are selected from 1 to 9 without repetition.
Introduces the core game logic to compare a player's input number
against the target number, calculating strikes and balls.
Updates README.md to mark "숫자 생성 기능" and "스트라이크, 볼 판별 로직" as completed.
Introduces the Result class to encapsulate the strike and ball counts
for a game turn. This class also provides utility methods to check for
a win condition (3 strikes) or a "nothing" result.
Integrates number generation, game play, result formatting, and restart logic.
Updates README with progress. Input validation pending.
…entions

Refactors the 'play' method in BaseballGame to eliminate the use of
the 'else' keyword and improve method single responsibility.
Extracts strike and ball counting into dedicated private methods
for clarity and better adherence to stated coding guidelines.
Refactors 'countStrikes' and 'countBalls' methods to adhere to the maximum indent depth rule (max 2).
Extracts increment logic into new helper methods ('getStrikeIncrement', 'getBallIncrement') to reduce nesting.
Refactors 'Application.java' to strictly adhere to coding conventions.
This includes reducing indent depth to a maximum of 2 by extracting helper methods,
ensuring all methods are under 15 lines, and removing recursion in favor of loops.
The validation logic and game loops were the main areas of improvement.
Adds a detailed unit test plan to README.md, outlining the test cases
for NumberGenerator, BaseballGame, and Result classes.
Adds comprehensive unit tests for the core domain logic:
NumberGenerator, BaseballGame, and Result.
Also updates the README to reflect the completion of the test plan.
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.

1 participant