Code Monkey home page Code Monkey logo

java-blackjack's Introduction

미션 리드미

기능 요구 사항

게임 시작

  • 플레이어 이름을 입력받는 기능.
    • 이름은 쉽표를 기준으로 분리된다.

게임 진행

첫 카드 분배

  • 딜러와 게임 플레이어에게 카드를 분배하는 기능.
  • 분배한 카드를 출력하는 기능.
    • 딜러의 카드는 한 장만 보여준다.
    • 플레이어의 카드는 두 장 모두 보여준다.

카드 draw

  • [xs] 카드 draw는 플레이어 먼저 진행하고, 딜러가 진행한다.
  • 플레이어 draw 기능
    • 점수가 21을 넘지 않을 경우, 원한다면 얼마든지 카드를 계속 draw가능.
    • 플레이어로부터 draw 여부를 입력받는 기능. (y 입력 받는 경우 draw)
      • 버스트할 경우 draw 불가능하며, 다음 플레이어의 draw를 진행한다.
        • (draw할 플레이어의 순서는 플레이어 입력 순서와 일치)
  • 딜러 draw 기능
    • 딜러는
      • 합계가 16점 이하이면 반드시 1장의 카드를 추가로 draw.
      • 합계가 17점 이상이면 추가로 카드를 받을 수 없다.
    • 딜러에게 Ace 가 분배된 경우
      • 버스트 되기 전까지는 11점으로 계산한다.
  • 카드 draw 결과 출력 기능

카드 점수 계산

  • 핸드의 총점을 계산한다.
    • Ace는 1또는 11로 계산한다.
      • Ace는 우선 11점으로 계산하고, 버스트할 경우 1점으로 계산한다.
    • King, Queen, Jack은 10점으로 계산한다.

게임 결과

승패 계산 기능

  • 승패를 계산하는 기능
  • 딜러가 버스트할 경우,
    • 버스트 하지 않은 플레이어는 승리
    • 버스트 한 플레이어가 있을 경우, 해당 플레이어에 대해 딜러는 승리, 플레이어는 패배.
  • 딜러가 버스트하지 않을 경우
    • 딜러보다 점수가 높은 플레이어는 승리. 딜러는 패배.
    • 딜러보다 점수가 낮은 플레이어는 패배. 딜러는 승리.
    • 버스트한 플레이어는 패배. 딜러는 승리.

승패 결과 출력

  • 승패 결과를 출력한다.

java-blackjack's People

Contributors

haero77 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.