Coder Social home page Coder Social logo

jwp-chess's Introduction

java-chess

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

기능 목록

체스판 초기화

  • 위치
    • 가로 위치는 왼쪽부터 a~h
    • 세로 위치는 아래부터 위로 1~8
  • 진영
    • 검은색(대문자)
    • 흰색(소문자)

말 이동

  • 시작 위차와 종료 위치를 입력하여 말을 이동할 수 있다.
    • 예외
      • source 위치에 말이 존재하지 않는 경우
      • target 위치에 아군 말이 존재하는 경우
      • 이동할 말이 움직일 수 없는 방향인 경우
      • source 와 target 사이에 아군 혹은 적군의 말이 있는 경우
    • 움직일 말이 폰인 경우에는 일반적인 말과 다른 규칙을 적용한다.
      • 대각선 위치로 이동하는 경우 반드시 적군이 있어야 한다.
      • 직선으로 이동하는 경우 말이 존재하지 않아야 한다.
      • 초기 위치에 있는 경우에만 직선으로 두 칸 이동할 수 있다.
  • 게임을 처음 시작하면 흰색 말을 먼저 움직일 수 있다.
  • 이동 후에는 턴을 상대 편으로 넘긴다.

승패 및 점수 판단

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

동시에 여러 게임 하기

체스방 만들기

  • localhost:8080 요청 시 노출되는 페이지에 체스방을 만들 수 있는 버튼이 있다.
  • 체스방 만들기 버튼을 누르면 새로운 체스판이 초기화 된다.
  • 체스방에는 고유식별값이 부여된다. (이 고유 식별값은 체스방 주소에서 사용 됨)

체스방 목록 조회하기

  • localhost:8080 요청 시 체스방 목록을 조회할 수 있다
  • 체스방 목록에는 체스방 제목이 표시된다.

체스방 참여하기

  • 체스방 목록에서 체스방을 클릭하면 체스 게임을 이어서 진행할 수 있다.

jwp-chess's People

Contributors

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