Description of the program in this section you will create a simple game. Players start at one end of a road that is 20 squares long. Each round the player rolls a dice and moves as many squares...

1 answer below »
python


Description of the program in this section you will create a simple game. Players start at one end of a road that is 20 squares long. Each round the player rolls a dice and moves as many squares forward as the dice show. What cutting rights depend on what kind of route the player ends up in -Common Route: The player moves to the square and the turn goes to the next player-Back to the start: The player moves back to the start -Obstacles: The player stays in the square the player was in before the dice roll A player wins if he or she reaches or passes the end of the road. The "Player" and "Dice" classes are awarded. Use the "score" property of the player to mark how far the player has come on the road. Sub-tasks a) Start by creating a class Route for custom route. All routes must have a move_hit method. This method should take a player object as a parameter. It is called when a player tries to move to the square. For custom route, move_hit should move the player to this route by updating the score property of the player to be the position of this route. The method should also return a string that contains a message that the player has been moved and to which route. This string should be printed by the main program (problem d) and e)) b) Then create a class BackToStart for a route that allows the player moves back to the start. The move_hit method should set the player's score to 0. The method should also return a string containing a message about which route the player tried to move to (the position of this route) but that the player must move back to the start. c) Create a class Obstacle for a route that stops the player for this round. The move_hit method should return a string that contains a message stating that the player is blocked. The method should not move the player (the player stays where he / she was last). d) Create a Python script that plays the game with one player. Make a road as a list of routes. Fill the list with a combination of the different types of route. There should be the most common routes and the fewest jerks back to the starting routes. e) Create a Python script that plays the game with multiple players. The program will end when a player has won. A player wins when he reaches either the end or past the end of the road.
Answered Same DayApr 12, 2021

Answer To: Description of the program in this section you will create a simple game. Players start at one end...

Vibhav answered on Apr 13 2021
143 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here