Skip to content

[행성 로또] 조건형 미션 제출합니다.#30

Open
iftype wants to merge 15 commits intowoowacourse-precourse:mainfrom
iftype:iftype
Open

[행성 로또] 조건형 미션 제출합니다.#30
iftype wants to merge 15 commits intowoowacourse-precourse:mainfrom
iftype:iftype

Conversation

@iftype
Copy link

@iftype iftype commented Jan 10, 2026

javascript-planetlotto-precourse

구현 할 목록

Model

  • Lotto : LottoNumber을 멤버로 가지는 모델

  • WinningLotto : LottoNumber과 Lotto 를 멤버로 가지는 모델

  • Money : 돈에 관한 모델

  • Rank : 등수 판별을 해주는 모델

  • LottoMachine : 로또를 발행 해주는 모델

기능

Lotto

Lotto Validaotor
  • 타입 판별
  • 로또의 숫자 범위 판별 (1~30)
  • 숫자 중복 검사

LottoMachine

  • 로또 발행

Money

Money Validator
  • 타입 판별
  • 구매 가능 여부 판별

Rank

  • 등수 판별해줌

LottoService

  • 로또 구매
  • 당첨 통계 계산

추가로 구현할 기능 목록

refactoring

  • LottoNumber: 캐싱을 통해 속도 향상

expansion

  • Money: 수익률 계산

iftype added 15 commits January 10, 2026 13:20
- Prettier, ESlint: 컨벤션을 위해 스타일라이브러리 추가
- @woowacourse/mission-utils:유틸라이브러리 추가
- 유효성 검사: 범위, 갯수, 중복 여부
- sort : 오름차순으로 정렬
- includes: 특정 숫자가 포함되는지 확인
 - 유효성 검사: 양수인지, 단위보다 큰지
 - getLottoCount: 단위로 나눈 값을 반환
- 클래스 생성 테스트( 중복,범위)
- 보너스와 Lotto 객체를 프로퍼티로 가짐
- buyLottos: 랜덤한 숫자로 로또를 발행
- calculateResult: 통계를 계산함
- 파일을 오케스트레이션
- 의존성 주입
- 조건 늘어남에따라 복잡도 증가
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

Comments