Question
Write the code in Python. Is it possible to implement a gui into the code. 1.To play Sorry, youll need to create up to Four
Write the code in Python. Is it possible to implement a gui into the code.
1.To play “Sorry”, you’ll need to create up to Four players.
Prompt the user for the number of players (2-4) and their names.
2. Create two die for the players to roll.
3. Create an appropriate variable/structure to track the player’s positions on the playing board.
4. The playing board has 50 spaces (with 50 being the winning space).
5. The dice have special conditions:
2 = Move two spaces
3 = Move three spaces
4 = Move back one space.
5 = Move back two spaces.
6 = Move six spaces.
7 = Swap spots with the leading layer / or nothing if player is in lead.
8 = lose your turn (no move).
9 = Move nine spaces.
10 = Move ten spaces.
11 = Swap spots with the last player / or do nothing if player is last.
12 = Start Over
6. A player must roll a double to start.
7. If a player lands on the same space as another, the other player must return to the beginning.
Example: If P1 lands on a space where P3 is, P3 would go back to the start.
8. A player must roll an EXACT number to enter the winning space.
9. Use a random Generator to “roll” the dice, the user must press enter to roll.
10. Depict the players’ positions on the screen after each round.
11. Once a player finishes, create a winning message announcing the winner.
12. Then ask the user if they would like to play again.
13. You must use at least three functions. Some function examples could be:
Roll dice, check for other player (when moving), display board.
14. Display the status/location of the players between sets of rolls.
15. Depict a Playing Board on the screen and display the Players’ position on the board. (Extra Credit)
(maybe try using a method to create the board and screen each time a player moves)
16. If a player rolls a double, they’ll get another roll
17. If a player rolls two doubles in a row, they Start Over
Step by Step Solution
3.46 Rating (156 Votes )
There are 3 Steps involved in it
Step: 1
Sure I can provide you with a simplified implementation in Python Well use the random module for dic...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started