Git Product home page Git Product logo

java-chess's Introduction

java-chess

체스 게임 구현을 위한 저장소

기능 요구사항

  • 콘솔 UI에서 체스 게임을 할 수 있는 기능을 구현한다.
  • 1단계는 체스 게임을 할 수 있는 체스판을 초기화한다.
  • 체스판에서 말의 위치 값은 가로 위치는 왼쪽부터 a ~ h이고, 세로는 아래부터 위로 1 ~ 8로 구현한다.
  • 체스판에서 각 진영은 검은색(대문자)과 흰색(소문자) 편으로 구분한다.
  • 체스 말의 이동 규칙을 찾아보고 체스 말이 이동할 수 있도록 구현한다.
  • move source위치 target위치을 실행해 이동한다.
  • 체스 게임은 상대편 King이 잡히는 경우 게임에서 진다. King이 잡혔을 때 게임을 종료해야 한다.
  • 체스 게임은 현재 남아 있는 말에 대한 점수를 구할 수 있어야 한다.
  • "status" 명령을 입력하면 각 진영의 점수를 출력하고 어느 진영이 이겼는지 결과를 볼 수 있어야 한다.

점수 계산 규칙

  • 체스 프로그램에서 현재까지 남아 있는 말에 따라 점수를 계산할 수 있어야 한다.
  • 각 말의 점수는 queen은 9점, rook은 5점, bishop은 3점, knight는 2.5점이다.
  • pawn의 기본 점수는 1점이다. 하지만 같은 세로줄에 같은 색의 폰이 있는 경우 1점이 아닌 0.5점을 준다.
  • king은 잡히는 경우 경기가 끝나기 때문에 점수가 없다.
  • 한 번에 한 쪽의 점수만을 계산해야 한다.

기능 구현 목록

  • 체스판 초기화 기능
  • 말 이동 기능
    • (예외 처리) 길이 막혀 있을 경우 이동 불가
    • (예외 처리) 이미 말이 있는 경우 이동 불가
    • 상대 말이 있을 경우 말을 잡는다.
  • 말 잡는 기능
    • 이동 가능하고, 상대 말일 경우 잡는다.
  • 점수 계산
    • 한 번에 한 쪽의 점수만 출력
  • 그 외 규칙
    • 끝에 도달하면 퀸으로 변경
    • 캐슬링

java-chess's People

Contributors

hamliet avatar dundung 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.