Giter Site home page Giter Site logo

dice-game's Introduction

Project DiceProgram

Versions

  1. Added gitignores and README

세상에서 가장 재밌는 주사위 게임

비즈니스 로직

  1. 플레이어는 15개의 주사위를 가져야한다.
  2. 주사위의 각 면은 6개로 이루어져야 한다.
  3. 주사위는 더블 2면, 쉴드 1면, 칼 2면, 해골 1면으로 이루어져 있다.
  4. 초기 입장할 때 밸런스는 1000으로 시작한다.
  5. 베팅할 포인트를 선택 후 게임을 시작해야 한다.
  6. 주사위가 없으면 턴을 스킵해야 한다.
  7. 한명의 체력이 0이거나 두명이 0이면 게임이 종료된다.
  8. 내가 그만을 눌렀을 때, 상대의 다이스가 0이거나 체력이 0일 때까지 게임을 진행하고, 내 턴은 스킵한다.

승리조건

  1. 둘자 주사위가 소진되기 전에 딜러의 체력을 0으로 만들면 베팅한 금액 * 3
  2. 둘다 주사위가 소진되고 딜러보다 체력이 높게 끝나면 리워드는 베팅한 금액 * 2

패배조건

  1. 플레이어의 주사위가 소진되거나 체력이 0이면 패배

무승부 조건

  1. 주사위가 소진되고 체력이 같을 때(쉴드 상관x) 무승부, 베팅금액 회수
  2. 주사위가 소진되고 두 플레이어의 체력이 0일 때 주사위의 족보에 따라 승부를 결정한다.

  1. 주사위를 한번 던지고 소모시키는 것
  2. 던진다 : 5개의 주사위를 던진다
  3. 그만 : 모든 턴을 포기하는 것

기능 로직(행동에 대한 정의)

  1. 각 객체 정의 : 플레이어(딜러와 플레이어), 주사위, 판
    • 플레이어(메타클래스 만들고 플레이어 A, B를 상속받음)
      • 상태:
      • 메서드:
    • 주사위(4개의 기능) - 클래스변수로
      • 상태:
      • 메서드:
      • 튜플로 더블 -> 쉴드 -> 해골 -> 칼
      • 해골: 내 방어 또는 체력 게이지 -1
      • 칼: 상대팀 방어 또는 체력 게이지 -1
      • 더블: 덱으로 돌아옴
      • 방패: 상대의 칼에 -1
      • 진행한 주사위는 소진함
      • 한개의 주사위에서 5개의 면을 리턴해줌
      • 게임의 한 단위를 결정
      • 현재 딜러와 플레이어의 방패 상태, 체력 게이지, 남은 주사위 갯수를 매 턴마다 출력해줌
      • 상태:
      • 메서드:

dice-game's People

Contributors

ckswhd7774 avatar heejung-gjt 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.