I uploaded a file
INSY 3010 Project Part 1 Due November 15 at 8pm (accepted until November 22 at 8pm for a late penalty) This project is to be completed in groups of 3. You may choose your own group. Part A : Number of Moves (45 pts) For this part of the project, you will be implementing the game ‘Candy Land’. Each player begins at the ‘start square’ In this game players draw a card from a deck and move the number of colored spaces indicated on the card. If you land on a licorice space then you lose a turn, and if you draw a specialty card you jump directly to that space on the board, regardless of whether it is in front of or behind your current position. The game ends when a player reaches the finish line at King Candy’s Castle. You should write a function for the computer to play the game and compute the number of moves it takes to get to King Candy’s Castle (finish) at the end of the board. We want to know how many turns we expect it to take for a person to make it from the start to the finish. To compute the expectation, you will need to run the game-play function 1000 times and take the average of the number of moves it takes to complete each of the 1000 games. You should write out the results of each game to a csv file as well as the min, max, and average number of turns. The min, max, and average number of turns should also be printed to the shell. The game-board and CSV file structure are shown below. The specific game board below is the current version of Candy Land sold by Habsbro. You may use an alternate version of the Candy Land board (there are many specialty versions available) if you would prefer, or you may create your own board as long as it has at least as many colors, board squares, specailty squares, and cards as the version shown below. Note: for the CSV formatting, remember that the writerows function uses a list of lists to write to the csv file, so you can edit just the first 3 lists to include the summary information after running all of the iterations. Part B : Interactive Game Play (40 pts) It is recommended that you make a copy of your code for the automated game play and modify it for this section rather than starting from scratch. You should implement a version of the game where you will play against the computer and your actual game play will be displayed using turtles. You will need to do the following for the basic game setup and play: • make the background of the turtle screen the game board • create 2 turtles of different colors- one for the user and 1 for the computer o inform the user which turtle is theirs • have the user play the game against the computer o the user should be prompted to draw a card at each turn o the computer’s moves then happen immediately after the user’s moves o the turtles should move, one square at a time, to reflect the current move o if a turtle takes a shortcut or jumps to one of the special positions, it must be moved to the correct position on the board – bonus points will be awarded if it actually travels along the path on the display board • announce the winner when either the user or the computer reaches the finish space Once you have the basic game functionality, add the following features: • The function should take in 2 optional parameters, forward_only & end_exact, with default values of 0. o If forward_only = 1, then if you draw a special card that is a position behind the current position on the board, the card is discarded and the turn is over but you don’t move to the special location o If end_exact = 1, then the rule should be enforced that in order to win the player (or computer) must land exactly on the finish space. Ex: if you are on the last orange space, you can only win by drawing double green or a single of any other color. Report (15 pts) With your python files, you should submit a written report explaining your setup for the game. This should include: • A cover page with all necessary identifying information for all three group members, the course number, and submission date • The steps taken to implement the game play, including, but not limited to: o what data structures did you use and why o how did you manage the back and forth between the computer and the live player o how did you manage the movement of the turtles • Summary statistics for the number of moves it takes to finish the game (min, max, average out of 1000 runs) Submission Instructions: Each group should submit 1 zip file containing the following: o The board game image you are using saved as a .png file o The report saved as a pdf. Make sure your report has your names and group number included at the top of the first page. o Two python files- one for Part A and one for Part B. Each python file should contain a function for the game play and a line to call that function so that when the file is run, the function runs. Make sure your python files have your names and group number in the comments at the top of the file, and that all of your code is thoroughly commented. Grading: Points Available Points Earned Pa rt A Basic game functionality 15 Get results from 1000 games 10 Compute expected number of steps 5 Correctly formatted output file 10 well documented (commented) code 5 Pa rt B Basic game functionality 10 Turtles move one square at a time 10 Turtles move along the path 5 Forward_only implementation 5 end_exact implementation 5 Creativity (inherently subjective – to be determined by the grader) 5 Re po rt Detailed explanation of game implementation 6 Summary of game statistics 2 Clarity of writing 3 Grammar and spelling 2 Report formatting 2 Note: The grade component for code comments is included in the rubric for Part A – but all of the code in parts A and B must be commented in order to receive full points in this category.