GithubHelp home page GithubHelp logo

java-baseball-precourse's Introduction

1주차 미션 - 숫자 야구 게임

프로그래밍 요구사항

  • 자바 코드 컨벤션을 지키면서 프로그래밍한다.
  • indent(들여쓰기) depth 3을 넘지 않도록 구현한다. 2까지만 허용한다
  • 3항 연산자를 사용하지 않는다.
  • 함수(또는 메소드)가 한 가지 일만 하도록 작게 구현한다.

기능 요구사항

  • 목표는 1부터 9까지의 서로 다른 수로 이루어진 3자리 숫자를 맞추는 게임이다.
  • 컴퓨터는 1에서 9까지 서로 다른 임의의 수를 선택한다.
  • 플레이어는 컴퓨터가 생각하고 있는 3개의 숫자를 입력하고, 컴퓨터는 입력한 숫자에 대한 힌트를 출력한다.
    • 같은 수가 같은 자리에 있으면, 스트라이크
    • 같은 수가 다른 자리에 있으면, 볼
    • 같은 수가 전혀 없으면, 낫싱
  • 과정을 반복해 컴퓨터가 선택한 3개의 숫자를 모두 맞히면 게임이 종료된다.
  • 게임을 종료한 후 게임을 다시 시작하거나, 완전히 종료할 수 있다.

구현할 기능 목록

  • 컴퓨터

    • 1에서 9까지 서로 다른 임의의 수를 선택한다.
  • 플레이어

    • 1부터 9까지의 3자리 숫자를 입력한다.
      • 3자리가 아닌경우, 숫자가 아닌경우, 0이 포함된 경우의 입력을 못하도록 한다.
  • 게임

    • 컴퓨터가 수를 정한다.
    • 플레이어는 숫자를 입력한다.
      • 입력한 숫자의 힌트를 출력한다.
      • 정답이 아닐경우, 계속해서 반복한다.
      • 정답일 경우, 다시 시작할 지 종료할 지 묻는다.

java-baseball-precourse's People

Contributors

pandahun avatar pobiconan avatar

Watchers

James Cloos 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.