To complete the chess game, assign each team member the following responsibilities
Role A (Keiji) : management.
Role B (Guilherme) : Implementing Game Logic
Role C (Helena) : Implementing isValidMove() method of King, Queen, and Rook
Role D (Cybill) : Implementing isValidMove() method of Bishop, Knight, and Pawn
- Fork Button on your top right.
- Open your terminal.
$ git clone https://github.com/<your username>/MiniProject-Chess.git
- Open project.
- Implement your code.
You can modify Driver.java to test your code. But if you are not Role B, do not add to commit Driver.java.
- Create a new branch locally. (
$ git checkout -b <<YourFirstName>>
) - Edit, add and commit files.
Please do not add new folders or files other than those already existing in the repository (e.g., out folder). - Push your branch to the remote repository. (
$ git push -u origin <<YourFirstName>>
) - Pull Request from your forked repository. README
The King is the most important piece on the chessboard. If he is checkmated (see objectives, below) the game is over! The King in chess can move one space in any direction (see the diagram). He can never move in to "check" (where he is threatened by another piece). This means the king can never be in the space adjacent to the opposing King.
The queen moves similarly to multiple pieces. It can move in any direction like a king (but the queen is not limited to a single square). The queen can move the same way a rook can, moving freely up and down on any file and left and right on any rank. The queen can move like a rook.
The rook move in straight lines. They are able to move up and down, and side to side on the board for as many squares as you choose, so long as nothing blocks their path. If an opposing piece blocks their way they can take it and occupy its square.
The bishop moves diagonally in any direction it wishes and as far as it wishes as long as the squares are free. If an opposing piece blocks its way the bishop can capture it and occupy its square.
The knight moves unconventionally compared to other chess pieces. Whereas other pieces move in straight lines, knights move in an “L-shape”—that is, they can move two squares in any direction vertically followed by one square horizontally, or two squares in any direction horizontally followed by one square vertically.
Unlike the other pieces, pawns cannot move backwards. Normally a pawn moves by advancing a single square, but the first time a pawn moves, it has the additional option of advancing two squares. Pawns may not use the initial two-square advance to jump over an occupied square or to capture. Any piece immediately in front of a pawn, regardless of color, blocks its advance. Unlike other pieces, the pawn does not capture in the same way that it moves. A pawn captures diagonally forward one square to the left or right (see diagram). A pawn that advances to the last rank is promoted to a queen, rook, bishop, or knight of the same color. The pawn is replaced by the new piece on the same move.
For this project, only Pawn's Promotion will be considered. Other special behaviors such as Passant and Castling are not to be implemented.