Code Monkey home page Code Monkey logo

tdd_test's Introduction

주사위 게임

진행 방법

  • 주사위 게임
  • 이전 미션과 동일

###기능 요구사항

  • 입력인원을 입력받는다 최대 4명
  • 참가자의 이름을 입력받는다.
  • 참가자의 이름은 최대 5자리이고 영문만 가능하다.
  • 참가자별 주사위 2개를 굴린다.
  • 주사위의 합이 높은사g람이 우승이다.
  • 우승자는 여러명이 가능하다.

실행화면

참여 인원은 몇명인가요?(최대4명)

3

참가자의 이름을 입력하세요 :

aaa

참가자의 이름을 입력하세요 :

bbb

참가자의 이름을 입력하세요 :

ccc

실행결과

aaa : 5 - 5 : 10

bbb : 2 - 6 : 8

ccc : 4 - 6 : 10

우승자는 aaa, bbb 입니다.

프로그래밍 요구사항

  • indent(들여쓰기) depth를 1단계만 사용한다.
    • depth의 경우 if문을 사용하는 경우 1단계의 depth가 증가한다. if문 안에 while문을 사용한다면 depth가 2단계가 된다.
  • 메소드의 크기가 최대 10라인을 넘지 않도록 구현한다.
    • method가 한 가지 일만 하도록 최대한 작게 만들어라.
  • else를 사용하지 마라.
  • 모든 기능을 TDD로 구현해 단위 테스트가 존재해야 한다. 단, UI(System.out, System.in) 로직은 제외
    • 핵심 로직을 구현하는 코드와 UI를 담당하는 로직을 구분한다.
    • UI 로직을 InputView, ResultView와 같은 클래스를 추가해 분리한다.
    • MVC로 구현을 진행한다.
  • 자바 코드 컨벤션을 지키면서 프로그래밍한다.
  • commit은 기능단위로 commit을하고 github의 commit 규칙을 지킨다.
  • 줄여쓰기를 하지 않는다. ex) search -> sel -> x
  • class, method, 변수, 상수의 naming 규칙을 반드시 지킨다.(코드컨벤션 확인)
  • 개행을 통해서 가독성을 늘린다.
  • 모든 Entity는 작게 유지한다.
  • 2개 이상의 인스턴스 변수를 가진 클래스를 쓰지않는다.
  • java8의 lambda, stream을 적극 활용한다.(IDE에만 의존하면 안된다.)
  • 모든 원시값을 포장한다.
  • 일급 컬렉션을 사용한다.
  • 반드시 TODO LIST를 READ ME에 작성한다.

tdd_test's People

Contributors

pih6585 avatar kth4878 avatar

Watchers

 avatar

Forkers

kth4878

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.