CSC 210: Introduction to Computer Programming Final Assignment: Simple Chess (10%) Due Friday 5/15/20, 11:59pm That’s Wizard’s Chess! For this assignment you will be developing a simplified version of...

Was wondering if anyone could help with java chess board.


CSC 210: Introduction to Computer Programming Final Assignment: Simple Chess (10%) Due Friday 5/15/20, 11:59pm That’s Wizard’s Chess! For this assignment you will be developing a simplified version of Chess as follows: 1. (1%) Initialization: a. Initialize the 8 x 8 chess board to the usual starting state of a chess game. Use a 2D array of Strings for this step. b. Prompt the user to choose the color they want to start the game with: black or white. c. Display the current status of the chess board, and the color that the user is currently playing for. 2. (1%) Move Inputs: a. Prompt the user to make a move. b. The user must specify the current location of the piece (the row index, and then the column index), and the desired destination of the piece (again, row and column index). For example, if the user specifies 0, 0, and then 2, 0, then they want to move the piece at location (0,0) to location (2,0), which is 2 squares vertically. c. Check for valid row and column indexes. 3. (6.5%) Making the Move: The program needs to check the following to complete the move: a. Check if there is a piece of the correct color at the specified current location. If there is not, then inform the user and go back to step 2. b. Check if the destination location is empty. If it is not, then inform the user and go back to step 2. c. Check whether the resulting move is allowed for the piece. The following is the allowed set of moves: (Note: Each of the rules below should be implemented as a separate method.) i. The King can move one square in any direction (horizontally, vertically, or diagonally). ii. The Queen can move any number of squares in any direction (vertically, horizontally, or diagonally). iii. The Rook can move any number of squares horizontally or vertically. iv. The Bishop can move any number of squares diagonally. v. The Knight moves in a “L” shape. For example two squares vertically and one square horizontally, or two squares horizontally and one square vertically. vi. The Pawn may move one square forward. vii. A piece cannot jump over other pieces in the path of the move, except for the knight. d. If the requested move satisfies all the above requirements, then complete the move, inform the user as such, and display the updated state of the chessboard. 4. (0.25%) Switch the color that will now make a move and inform the user about it. 5. (0.25%) Ask the user if they want to continue playing or if they want to end the game. If the user chooses to continue, then go back to step 2 and continue from there, otherwise terminate the program. (0.5%) Include comments wherever appropriate. (0.5%) Your program needs to execute without errors and produce the correct outcomes. There are many places in this assignment where the use of methods will reduce code repetition. Thus, you are encouraged to use methods throughout this assignment (not just in step 3 where methods are required). You need to upload to iLearn one java file named SimpleChess.java.
May 10, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here