Git Product home page Git Product logo

java-racingcar's Introduction

java-racingcar

μžλ™μ°¨ κ²½μ£Ό λ―Έμ…˜ μ €μž₯μ†Œ

μš°μ•„ν•œν…Œν¬μ½”μŠ€ μ½”λ“œλ¦¬λ·°

Git commit 메세지

  • μ ‘λ‘μ–΄λ‘œ docs, test, feat, fix, refactor, chore μ‚¬μš©
  • example feat: μ‚¬μš©μž μž…λ ₯ ν›„ 도메인 μ‚¬μš©

κΈ°λŠ₯ μš”κ΅¬μ‚¬ν•­

μž…μΆœλ ₯

  • μ‚¬μš©μžλ‘œλΆ€ν„° μžλ™μ°¨ 이름을 μž…λ ₯λ°›λŠ”λ‹€.
    • μžλ™μ°¨ 이름은 μ‰Όν‘œλ‘œ κ΅¬λΆ„ν•œλ‹€.
    • μžλ™μ°¨ μ΄λ¦„μ˜ μ•žλ’€ λΉˆμΉΈμ„ μ œκ±°ν•œλ‹€.
    • 이름 쀑볡은 ν—ˆμš©ν•˜μ§€ μ•ŠλŠ”λ‹€.
    • 빈 μž…λ ₯을 ν—ˆμš©ν•˜μ§€ μ•ŠλŠ”λ‹€.
  • μ‚¬μš©μžλ‘œλΆ€ν„° μ‹œλ„ν•  횟수λ₯Ό μž…λ ₯λ°›λŠ”λ‹€.
    • μ‹œλ„ν•  νšŸμˆ˜κ°€ μžμ—°μˆ˜μΈμ§€ κ²€μ¦ν•œλ‹€.
  • μ‹œλ„ 횟수λ₯Ό μžμ—°μˆ˜λ‘œ λ³€ν™˜ν•œλ‹€.
  • μ‚¬μš©μžκ°€ 잘λͺ»λœ 값을 μž…λ ₯ν•  경우 IllegalArgumentExceptionλ₯Ό λ°œμƒμ‹œν‚€κ³ , "[ERROR]"둜 μ‹œμž‘ν•˜λŠ” μ—λŸ¬ λ©”μ‹œμ§€λ₯Ό 좜λ ₯ ν›„ κ·Έ λΆ€λΆ„λΆ€ν„° μž…λ ₯을 λ‹€μ‹œ λ°›λŠ”λ‹€.
    • Exception이 μ•„λ‹Œ IllegalArgumentException, IllegalStateException λ“±κ³Ό 같은 λͺ…ν™•ν•œ μœ ν˜•μ„ μ²˜λ¦¬ν•œλ‹€.
  • κ²Œμž„ μ™„λ£Œ ν›„ κ°€μž₯ 많이 μ „μ§„ν•œ μžλ™μ°¨λ₯Ό μ΅œμ’… 우승자둜 좜λ ₯ν•œλ‹€.
    • μš°μŠΉμžλŠ” ν•œ λͺ… 이상일 μˆ˜λ„ 있으면, 컴마(',')둜 κ΅¬λΆ„ν•˜μ—¬ λͺ¨λ‘ 좜λ ₯ν•œλ‹€.
  • κ²Œμž„ λΌμš΄λ“œλ§ˆλ‹€ λͺ¨λ“  μžλ™μ°¨μ˜ 전진 진행 상황을 좜λ ₯ν•œλ‹€.

κ²Œμž„ 진행

  • 랜덀 값이 0κ³Ό 9 μ‚¬μ΄λ‘œ μ œν•œν•œλ‹€.
  • λžœλ€κ°’μ΄ 4 이상일 경우, μ „μ§„ν•œλ‹€.
  • λžœλ€κ°’μ΄ 3 μ΄ν•˜μΌ 경우, λ©ˆμΆ˜λ‹€.
  • μ‹œλ„ 횟수만큼 κ²Œμž„ λΌμš΄λ“œλ₯Ό μ§„ν–‰ν•œλ‹€.
  • κ΅¬λΆ„λœ μžλ™μ°¨ 이름은 5자 μ΄ν•˜λ§Œ κ°€λŠ₯ν•˜λ‹€.
  • μ΅œμ’… 우숭자λ₯Ό λ°˜ν™˜ν•œλ‹€.

ν”„λ‘œκ·Έλž˜λ° 진행상황

  • UIλ₯Ό μ œμ™Έν•œ λͺ¨λ“  λ‘œμ§μ— λ‹¨μœ„ ν…ŒμŠ€νŠΈλ₯Ό κ΅¬ν˜„ν•œλ‹€.
  • ν•œ λ©”μ„œλ“œμ— 였직 ν•œ λ‹¨κ³„μ˜ λ“€μ—¬μ“°κΈ°(indent)만 ν•œλ‹€.
  • else μ˜ˆμ•½μ–΄λ₯Ό μ‚¬μš©ν•˜μ§€ μ•ŠλŠ”λ‹€.
  • ν•œ λ©”μ„œλ“œμ˜ 길이가 15 라인을 λ„˜μ–΄κ°€μ§€ μ•Šλ„λ‘ κ΅¬ν˜„ν•œλ‹€.
  • ν•¨μˆ˜κ°€ ν•œ κ°€μ§€μ˜ 일을 ν•˜λ„λ‘ κ΅¬ν˜„ν•œλ‹€.

java-racingcar's People

Contributors

chocochip101 avatar geoje avatar pobiconan avatar woowahan-neo avatar woowahan-pjs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.