Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.