Question: JAVA I am trying to create a snake/ladder game with Java. This game has a Player class with a constructor that defines a symbol. public

JAVA

I am trying to create a snake/ladder game with Java. This game has a Player class with a constructor that defines a symbol.

public class Player {

private char symbol; Player() { symbol = 's'; }

It also has a Driver class, Play(), where the user is asked how many players they have (2-4). This must given an error message if it is not in range and if the user did not input a valid number. The user is also asked which of the 4 symbols (^&@$) they want to play as. They cannot chose the same piece, so if they do there must be an error message. They cannot chose a symbol that is not one of the 4. Each symbol they use must be assigned to them using the player class symbol and objects (so use setters).

make sure to make an object for player like so.

Player[] players = new Player[userInputOfPlayers]; for (int randomInt=0; randomInt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!