Question: YoAssignment Description: We are going to play a fun strategy game that only requires two players! In this game, we have an 8 8 board
YoAssignment Description: We are going to play a fun strategy game that only requires two
players! In this game, we have an board and a Knight chess piece that starts on the top left
of the board. Each player gets to move the Knight piece one square over either down, diagonal
bottom right direction or to the right of its current position a player cannot move the piece two
or more squares The Knight piece can keep moving until it reaches the bottom right corner of
the board. The respective player that moves the Knight to the bottom right corner of the board
wins the game! In this assignment you are going to implement the winning strategy for player
only.
When the game begins, the knight is
on the top left square of the board.
When the game ends, the knight is on
the bottom right square of the board.
For this assignment, you must follow these requirements.
You will create a public class called Game.
The Game Class will have the following attributes:
aD integer array that symbolizes the board to assist you with simulating the game.
bD primitive character array that stores the respective moves that will be used for
player Please store them in order of how they are presented here.
i for downward diagonal right direction index
ii for horizontal right direction index
iii. b for vertical bottom direction index
c A reference to a Random Class object. This will point to the object created by the
driver and passed to the constructor. This should be used when selecting a random
move for player in the selectPlayer TwoMove method.ur solution must run within seconds.
We are going to play a fun strategy game that only requires two
players! In this game, we have an board and a Knight chess piece that starts on the top left
of the board. Each player gets to move the Knight piece one square over either down, diagonal,
or to the right of its current position a player cannot move the piece two or more squares The
Knight piece can keep moving until it reaches the bottom right corner of the board. The
respective player that moves the Knight to the bottom right corner of the board wins the game! In
this assignment you are going to implement the winning strategy for both players.
When the game begins, the knight is
on the top left square of the board.
When the game ends, the knight is on
the bottom right square of the board.
For this assignment, you must follow these requirements.
You will create a public class called Game.
The Game Class will have the following attributes:
aD integer array that symbolizes the board.
bD primitive char array not a String object that will store computerize moves.
There is no need to use the Random Class. Hint: This should be used in one of the
hypothetical strategies for one of the players to always win.
The Game Class has a constructor that takes two parameters
a A primitive integer that represents the size of board assume the board is always a
square
b A String object reference that contains the name of a file that keeps the moves the
player will use in the game.
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
