Skip to content

Conversation

@larshew
Copy link

@larshew larshew commented Dec 21, 2022

No description provided.

larshew and others added 15 commits December 13, 2022 20:28
add NumBaseBallsNSize(int size), which makes new object with randomly
assigned numbers(nums)
unit test comprises of two sectors, one is whether constructors raise
exception and the other one is whether constructors make randomly
assigned numbers.
…java and unit test

unit test comprises whether the constructor throws exception
appropriately.
- add dataobject.TrialResult and its methods
- add unit test(chkValidNumber method : throw appropriately)
not add unit test because of programming requirements.
additionally add "private int inputNum(String promptStr)" because
inputNumbers method exceeds 10 lines and depth limitation.
원래 README.md를 작성 후 clone하여 다운받아야 하는데 clone을 하고
README.md를 작성하였다. 그 결과 push를 했을 때 오류가 났는데, 단순
오류라고 생각하여 -f를 써 강제로 push하였다. 그 결과 README.md가
초기화가 되어버렸다. 이에 다시 업로드한다.
…e(NumBalls trial)

Would be better to add compare method in NumBalls and its child classes,
      rather than manager.GameManager,
      because comparison of two numbers is property of NumBalls.
Need to fix README.md
…t.NumBallsNBalls, manager.GameManager class

Add TrialResult compare(NumBalls trial) on dataobject.NumBalls, dataobject.NumBallsNBalls.
Remove TrialResult verdict(NumBalls trial) on manager.GameManager class.
This should commit with commit #dca9741, which contains method that throws WrongTypeException.class
…(GameUserInterfaceTestStub)

This methods are implemented in GameManager:
    public GameManager(GameUserInterface gameUserInterface, NumBalls
	    numBalls, int size)
    public void execute()
    public boolean executeOneCycle() - return true if game ends.

Fix one tiny omission on GameUserInterfaceKorean.printError(Exception e)
    consider WrongTypeException (newly added in #498febf, #cc3f72a

Implement unit test and supplimentary test stub(replace I/O)
manager.ProcessManager - just call execute() for game start.
main.Main - make executable program
because of bad conditional in while loop, infinite loop is made
(in ui.GameUserInterfaceKorean.inputNumbers())
delete unused imported library(automatically added but not used)
reduce one line through refactoring

<Before>
ArrayList<Integer> trial = gameUserInterface.inputNumbers();
TrialResult result = answer.compare(new NumBallsNBalls(trial));

<After>
TrialResult result = answer.compare(new NumBallsNBalls(gameUserInterface.inputNumbers()));
Correct some mismatches, such as type mismatch.
Add missing methods of some private methods.
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