If the version of your code on github does not run, it is considered non-functioning. If it does not run on your personal computer WITHOUT CHANGES, it is considered non-functioning.
WARNING: Graders will not grade any part of your code that does not execute.
TOTAL: 25 points
In this lab, you will learn to:
For this lab we are going to extend the previous lab to run a simulated game with 10 rounds where the 2 players take turns throwing their own dart.
You should assign a specific color to each player, alternating turns.
For example:
*This is the thought process of how this should work, not print() statements
We will simplify the game of darts by saying that if the player lands inside the circle, they score a point.
You should choose the player's color for darts that are within the circle, and a different color for darts outside of the circle.
You will need to keep track of each player's score with a different variable.
After the 10 rounds, display on screen, using the pygame font library, which player has won or if there was a tie.
font = pygame.font.Font(None, 48)
text = font.render(<your message>, True, "white")
screen.blit(text, (<x>, <y>)) # where <x> and<y> are coordinates on screen
The last part of your program allows your user to guess which of two players will win the dart game.
Your program should display 2 square boxes on the screen, with each one colored to represent one of the two players, for example, player red and player blue.
You can place the boxes anyhwhere you like on screen.
You will then ask the user to select which player will win, player1 or player2, using the mouse.
Becuase you are waiting for a user event, you will need to put your dart code into a mainloop, and only start the dart game when the user clicks one of the boxes.
Using an event loop, respond to the mouse click event to keep track of the user's selection in variable.
After the dart game, in additon to the results of the game, display whether or not the user guessed correctly.
main.py
Complete your submission by making a commit and push using either the Source Control tab in VSCode or the command line in the shell.
That's it! You've completed the work for this lab.