Question: Design a simple program to play a simplified version of checker. Specifically, the program has to print the board and then alternatively ask the correct
Design a simple program to play a simplified version of checker. Specifically, the program has to print the board and then alternatively ask the correct player to insert the old and the new coordinates of the piece to move. The system has to check whether the coordinates refer indeed to a player's owned piece and that the new position fulfills the requirements ie diagonal forward move in an empty cell The program has to continue until the user terminates it by entering a coordinate as value No jumps or multiple jumps and no piece crowning should be implemented.
Here is an example of "gameplay" in blue are the inputs provided by the user:
X axis
Turn of player no
Coordinate of piece to move
Enter X:
Enter Y:
Coordinate of new position
Enter X:
Enter Y:
Piece moved!
X axis
Turn of player no
Coordinate of piece to move
Enter X:
Enter Y:
Coordinate of new position
Enter X:
Enter Y:
Piece moved!
X axis
Turn of player no
Coordinate of piece to move
Enter X:
Enter Y:
Coordinate of new position
Enter X:
Enter Y:
Piece moved!
X axis
Turn of player no
Coordinate of piece to move
Enter X:
Initial code
The code you must start from is the following no package declaration, class name Checker:
import java.util.Scanner;
public class Checker
to insert the old and the new coordinates of the piece to move. The system has to check whether the coordinates refer indeed to a player's owned piece and
that the new position fulfills the requirements ie diagonal forward move in an empty cell The program has to continue until the user terminates it by
entering a coordinate as value No jumps or multiple jumps and no piece crowning should be implemented.
Here is an example of "gameplay" in blue are the inputs provided by the user:
Turn of player no
Coordinate of piece to move
Enter X:
Enter :
Coordinate of new position
Enter X:
Enter Y:
Piece moved!
Turn of player no
Coordinate of piece to move
Enter X:
Enter :
Coordinate of new position
Enter X:
Enter Y:
Piece moved
Turn of player no
Coordinate of piece to move
Enter X:
Enter Y:
Coordinate of new position
Enter X:
Enter Y:
Piece moved!
Turn of player no
Coordinate of piece to move
Initial code
The code you must start from is the following no package declaration, class name Checker:
import java.util.Scanner;
public class Checker
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
