Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f9b5675
feat: 랜덤으로 정답값 생성
ehlung May 27, 2026
9bc9553
feat: 유효성 검사 로직
ehlung May 27, 2026
aa6507c
refactor: 유틸 함수들을 BaseballGame 객체의 메서드로 통합
ehlung May 28, 2026
6be6a2d
feat: 버튼 요소 수정
ehlung May 28, 2026
012e2bc
feat: index.js 작성
ehlung May 28, 2026
fc0ed91
refactor: userInputValue 배열로 받아서 넣기
ehlung May 28, 2026
3ac145b
refactor: userInputValue 배열 타입 변환 추가 (에러 방지)
ehlung May 28, 2026
89bbd10
refactor: Random 라이브러리 호출 방법 오류 수정
ehlung May 28, 2026
60d0ec2
refactor: 문법 및 자잘한 오류 수정(1주차 최종)
ehlung May 28, 2026
4088b5f
chore: package-lock.json 업데이트
ehlung May 28, 2026
771e62e
refactor: BaseballGame 함수의 play 메서드에서 문자열 변환 로직 제거 (MVC 패턴 적용)
ehlung May 28, 2026
d9a66fb
refactor: View.js 생성 (MVC 패턴 적용)
ehlung May 28, 2026
5a91c51
refactor: index.js 네이밍 Controller.js로 변경 및 View와 Controller 역할 분리 (MV…
ehlung May 28, 2026
2405a5b
fix: View 인스턴스 생성 및 교체
ehlung May 28, 2026
afbfa33
fix: getInputValue 메서드 형태로 호출 수정
ehlung May 28, 2026
6173de9
fix: 최종 문자열 로직 수정 (let 사용, finalResultString 값 할당 수정, 배열의 길이를 검사해야 함.…
ehlung May 28, 2026
31e0e15
refactor: DOM 요소 const 로컬 변수 선언 -> this. 인스턴스 속성 정의 방식 변경
ehlung May 28, 2026
25f6ce1
chore: 파일 이름 변경 수정
ehlung May 28, 2026
f6d2d61
docs: 개인 미션 수행 README.md 작성
ehlung May 28, 2026
867a904
Update src/View.js
ehlung May 29, 2026
72d466d
refactor: DOM 요소 변수명에 $ 접두사 추가
ehlung May 29, 2026
0ab2ef2
refactor: 매직넘버 상수 네이밍 컨벤션 적용
ehlung May 29, 2026
6b79a95
refactor: ERROR_MESSAGE 상수 Model에서 export 및 Controller import 적용
ehlung May 29, 2026
ff6373d
refactor: Model 유효값 검증 로직 개선(문자열 타입으로 검사), 입력값의 검증 이후 가공해 게임 실행 수정
ehlung May 29, 2026
e7c359f
refactor: 문자열 변환 로직 Controller → Model로 이동
ehlung May 29, 2026
0b13890
refactor: 정답 판별 로직 MVC 패턴 정확히 분리 및 결합도 낮추기
ehlung May 29, 2026
5137620
fix: 성공 메서드 호출 안함 수정
ehlung May 29, 2026
71475f1
refactor: 변수명을 더 직관적으로 수정
ehlung May 29, 2026
0027e73
docs: README 형식 통일 및 내용 수정
ehlung May 29, 2026
07b09e3
docs: README에 과거 코드와의 비교 내용 추가 작성
ehlung Jun 1, 2026
89e23d9
docs: REAMEME 양식통일 수정
ehlung Jun 1, 2026
4b7245d
Update README.md
ehlung Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
415 changes: 313 additions & 102 deletions README.md

Large diffs are not rendered by default.

52 changes: 25 additions & 27 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
<!DOCTYPE html>
<!doctype html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<title>숫자 야구 게임</title>
</head>

<head>
<meta charset="UTF-8" />
<title>숫자 야구 게임</title>
</head>

<body>
<div id="app">
<h1>⚾ 숫자 야구 게임</h1>
<p>
<strong>1~9까지의 수</strong>를 중복없이
<strong>3개</strong> 입력해주세요. <br />
올바른 예) 139 <br />
틀린 예) 122
</p>
<form>
<input type="text" id="user-input" />
<button id="submit">확인</button>
</form>
<h3>📄 결과</h3>
<div id="result">1볼 1스트라이크</div>
<button id="game-restart-button">재시작</button>
</div>
<script src="https://cdn.jsdelivr.net/npm/@woowacourse/mission-utils@1.0.1/dist/mission-utils.min.js"></script>
<script type="module" src="src/index.js"></script>
</body>

<body>
<div id="app">
<h1>⚾ 숫자 야구 게임</h1>
<p>
<strong>1~9까지의 수</strong>를 중복없이
<strong>3개</strong> 입력해주세요. <br />
올바른 예) 139 <br />
틀린 예) 122
</p>
<form>
<input type="text" id="user-input" />
<button id="submit">확인</button>
</form>
<h3>📄 결과</h3>
<div id="result"></div>
<button id="game-restart-button" hidden>재시작</button>

@meteorqz6 meteorqz6 May 28, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[제안]
저는 hidden 말고 style="display: none" 으로 재시작 버튼 숨김 처리를 했는데 두 가지 방식의 차이점에 대해서 같이 알아볼까요?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

좋은 공부가 될 것 같습니다. 관련 내용은 마찬가지로 레포 README에 정리해두었습니다.

</div>
<script src="https://cdn.jsdelivr.net/npm/@woowacourse/mission-utils@1.0.1/dist/mission-utils.min.js"></script>
<script type="module" src="src/Controller.js"></script>
</body>
</html>
Loading