Coder Social home page Coder Social logo

java-racingcar-precourse's Introduction

자동차 경주 게임

진행 방법

  1. 경주에 참여 할 자동차 입력을 입력 한다.(,로 구분)
  2. 경주가 몇 라운드로 진행 될지 입력 한다.
  3. 한 라운드 당 한 차량은 전진 또는 멈출 수 있다.
  • 전진 조건 : 09의 랜덤 숫자 중 03이 나온 경우
  • 멈춤 조건 : 09의 랜덤 숫자 중 40가 나온 경우
  1. 모든 라운드가 진행 된 후, 최종 우승자를 알 수 있다
  • 우승자는 한 명 이상 일 수 있다.

모듈 구현

  1. TDD로 구현 가능한 요구사항을 먼저 구현한다.
  • 자동차 객체 (Car)
    • 자동차이름, 점수를 갖는다.
    • 점수를 추가 기능 구현
  • 자동차 리스트 객체 (Cars)
    • 자동차 1 대 이상, 자동차 이름 길이 5자 이하 유효셩 체크
    • 진행 중 스코어 출력 기능 구현
    • 승자 구하는 기능 구현
  • 게임 진행 객체 (Game)
    • 라운드 입력 받아 유효성 체크 (1이상의 숫자)
    • 게임 진행
    • Cars 객체로 명령을 보내는 역할
    • 최종 결과 출력
  1. 랜덤 생성과 관련 된 부분을 구현한다.
  • 랜덤 숫자 객체 (RandomNumber)
  • 전진/멈춤 판단 객체 (Judgement)
  • 전진/멈춤 enum 구현 (MoveStatus)
  1. 그 외 게임 실행 및 메시지와 관련된 부분을 구현한다.
  • Message 출력 enum 구현 (Message)
  • print log에 대한 util클래스 구현 (PrintHelper)
  • 게임 시작 Application 구현 (GameStarter)
  • validation체크 객체 구현 (Validator)

java-racingcar-precourse's People

Contributors

erin0331 avatar javajigi avatar pobiconan 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.