-
Notifications
You must be signed in to change notification settings - Fork 231
[1단계 - 행운의 로또 미션] 유세지(김용래) 미션 제출합니다 #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
77c2296
docs: todo list 정리
usageness b90e001
test: model 테스트 케이스 구현
usageness c0ad6c3
feat: Lotto, LottoGame 모델 구현
usageness a0cb9ff
feat: 마크업, css 적용
usageness 4841ed6
feat: LottoGame controller 구현
usageness 272bbc6
refactor: DOM 요소, 에러 메시지 상수화
usageness 6f1cb92
chore: eslint, prettier 적용
usageness 3084723
chore: lint 설정으로 인한 변경사항
juunzzi 1058e9b
feat: 정상적인 금액을 입력하면, 구매한 로또가 보인다
juunzzi 988cb4a
feat: 번호 보기를 클릭하면, 로또 보기 상태가 변경된다
juunzzi 0121c1a
refactor: 상수화 진행, align-state 의 dataset property를 변경
juunzzi e09d6ce
chore: 최신버전의 ecmaVersion으로 변경
juunzzi 521d5f7
style: converter 스타일 코드를 추가
juunzzi af546a4
chore: eslint 설정 변경으로 인한 수정사항
juunzzi d91222e
refactor: onSubmitChargeInputForm 함수의 로직을 다른 메소드로 정의
juunzzi 42e1984
refactor: converter css 파일에서 레이아웃 코드를 분리
juunzzi 01be1a1
refactor: LottoGameModel의 숫자 리터럴 상수화, LottoModel의 주석을 제거
juunzzi a6e9dd3
refactor: LottoGameModel에서 불필요한 메소드 삭제, 메소드의 네이밍 수정
juunzzi 0c6252a
test: 모델의 변경사항을 테스트 파일에 적용 및 상수화 진행
juunzzi a5f2a45
docs: todo.md 수정
juunzzi 6851773
refactor: import css 문에 확장자 추가
juunzzi b4f543c
refactor: getter 함수는 복사된 값을 리턴, createLottoList의 로직을 수정, 에레메세지 텍스트 변경
juunzzi ae4be3c
refactor: LOTTO_NUMBER_LENGTH 상수 이름 변경
usageness 8184bb9
refactor: createLottoList 로직의 for문을 map()으로 대체
usageness 5b0faf9
chore: github pages 사용을 위한 세팅
usageness a2a8e71
refactor: randomNumber() 의 호출 횟수를 줄이도록 변경
usageness f3568c2
refactor: isValidNumber 로직 검색 효율 개선
usageness b9b9997
refactor: 필요없는 메서드 일원화
usageness b4724f9
chore: 깊은 복사 test 문법 변경
usageness File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| module.exports = { | ||
| env: { | ||
| browser: true, | ||
| es2021: true, | ||
| es6: true, | ||
| node: true, | ||
| }, | ||
| extends: ['tui', 'prettier'], | ||
| parserOptions: { | ||
| sourceType: 'module', | ||
| /** spread eslint error - 최신버젼의 ecmaVersion*/ | ||
| ecmaVersion: 'latest', | ||
| }, | ||
| rules: { | ||
| 'no-var': 'error', | ||
| 'max-depth': ['error', 2], | ||
| 'max-lines-per-function': ['error', 15], | ||
| 'no-console': 'warn', | ||
| 'no-param-reassign': 'error', | ||
| 'padding-line-between-statements': 0, | ||
| 'newline-before-return': 0, | ||
| 'no-undefined': 0, | ||
| 'no-constant-condition': 0, | ||
| 'no-unused-private-class-members': 0, | ||
| }, | ||
| }; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // NHN convention | ||
| module.exports = { | ||
| singleQuote: true, | ||
| printWidth: 100, | ||
| tabWidth: 2, | ||
| useTabs: false, | ||
| semi: true, | ||
| quoteProps: 'as-needed', | ||
| jsxSingleQuote: false, | ||
| trailingComma: 'es5', | ||
| arrowParens: 'always', | ||
| endOfLine: 'lf', | ||
| bracketSpacing: true, | ||
| jsxBracketSameLine: false, | ||
| requirePragma: false, | ||
| insertPragma: false, | ||
| proseWrap: 'preserve', | ||
| vueIndentScriptAndStyle: false, | ||
| }; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| ## 투두 리스트 | ||
|
|
||
| <!-- | ||
| 로또 구입 금액을 입력하면, 금액에 해당하는 로또를 발급해야 한다. | ||
| 로또 1장의 가격은 1,000원이다. | ||
| 소비자는 자동 구매를 할 수 있어야 한다. | ||
| 번호 보기 토글 버튼을 클릭해 로또 번호를 볼 수 있어야 한다. | ||
| --> | ||
|
|
||
| **로또 모델** | ||
|
|
||
| - [✅] 로또 모델에 숫자 배열을 인자로 넣어서 인스턴스를 생성할 수 있다. | ||
| - [✅] 로또 모델의 배열에 들어갈 값은 1이상 45이하의 숫자여야 한다. | ||
| - [✅] 로또 모델에 들어갈 배열의 길이는 6이어야 한다. | ||
| - [✅] 로또 모델의 번호와 당첨 번호를 비교하여 등수를 반환할 수 있어야 한다. | ||
|
|
||
| **로또 게임 모델** | ||
|
|
||
| - [✅] 로또 게임 모델에 금액이 정상적으로 입력되면, 구매할 수 있는 로또의 수를 반환할 수 있어야 한다. | ||
| - [✅] 금액은 1000이상의 숫자여야한다. | ||
| - [✅] 로또 번호 배열들을 입력하여 로또 모델을 생성하고 관리할 수 있어야 한다. | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,65 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="ko"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <title>🎱 행운의 로또</title> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| </head> | ||
|
|
||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <title>🎱 행운의 로또</title> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| </head> | ||
| <body> | ||
| <div id="app"> | ||
| <h1 class="header-title">🎱 행운의 로또</h1> | ||
| <section id="charge-input-section" aria-labelledby="charge-input-section-title"> | ||
| <h1 id="charge-input-section-title" hidden>금액을 입력하는 섹션입니다.</h1> | ||
| <p>구입할 금액을 입력해주세요</p> | ||
| <form id="charge-input-form"> | ||
| <input id="charge-input" type="number" placeholder="금액" /> | ||
| <button id="charge-button">구입</button> | ||
| </form> | ||
| </section> | ||
|
|
||
| <body> | ||
| <div id="app"> | ||
| <h1>🎱 행운의 로또</h1> | ||
| </div> | ||
| <script type="module" src="./src/js/index.js"></script> | ||
| </body> | ||
| <section id="lotto-section" aria-labelledby="lotto-section-title"> | ||
| <h1 id="lotto-section-title" hidden>구매한 로또를 확인하는 섹션입니다.</h1> | ||
| <div class="lotto-wrapper"> | ||
| <span id="purchased-message"></span> | ||
| <div id="lotto-container" data-visible-state="false"></div> | ||
| </div> | ||
| <div id="align-converter-container"> | ||
| <label for="align-converter"> | ||
| <span>번호 보기</span> | ||
| <input id="align-converter" type="checkbox" class="converter" /> | ||
| <span class="checkmark"> | ||
| <span class="circle"></span> | ||
| </span> | ||
| </label> | ||
| </div> | ||
| </section> | ||
|
|
||
| <section id="win-number-input-section" aria-labelledby="win-number-input-title"> | ||
| <h1 id="win-number-input-title" hidden>당첨 번호 입력 섹션</h1> | ||
| <p>지난 주 당첨번호 6개와 보너스 번호 1개를 입력해주세요.</p> | ||
| <form id="win-number-input-form"> | ||
| <div class="win-number-input-wrapper"> | ||
| <div> | ||
| <p>당첨 번호</p> | ||
| <input id="win-number-1" type="number" /> | ||
| <input id="win-number-2" type="number" /> | ||
| <input id="win-number-3" type="number" /> | ||
| <input id="win-number-4" type="number" /> | ||
| <input id="win-number-5" type="number" /> | ||
| <input id="win-number-6" type="number" /> | ||
| </div> | ||
|
|
||
| <div class="bonus-number-wrapper"> | ||
| <p>보너스 번호</p> | ||
| <input id="bonus-number" type="number" /> | ||
| </div> | ||
| </div> | ||
|
|
||
| <button id="result-button">결과 확인하기</button> | ||
| </form> | ||
| </section> | ||
| </div> | ||
| <script type="module" src="./src/index.js"></script> | ||
| </body> | ||
| </html> |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기 있는 내용들은 모두 '나중에 할 일'을 정리해두신 거죠? 각각에 checked가 되어있어서 이미 구현하신줄 알았네요...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
앗 맞습니다 😅 step2 내용까지 실수로 체크 해버렸네요..