First Procedure:
My first code segment defines the "Replay" Procedure. It contributes to the overall functionality of the program by storing the code used to execute the ability to replay the game and adding to the difficulty. The procedure uses a parameter called, “Replay”. The parameter is a string and represents the ability to replay the game. When the procedure is called it executes an algorithm containing sequence, repetition, and selection. The selection is if get Replay=Green then go into the loop which sets the BlackQueen, BlackRook, BlackHorse, and BlackBishop speeds higher by adding a random integer from 1-3, multiplying it by "global Difficulty" and then resetting the global initial positions for the BlackQueen, BlackRook, BlackHorse, and BlackBishop and call the procedure "Newround" which gives you a message, “Good Luck, your new difficulty multiplier is "global Difficulty". Last part is to set the label text to follow the "global Difficulty". Also, the other if or then statement is if get Replay=Red then open the ThanksForPlaying screen. Last, but not least for the sequence, the code starts at the top of the procedure and then follows to the bottom of the procedure following the code in the dedicated order.
Second Procedure:
The identified procedure named "KingCollide" with a parameter named "sprite" contributes to the overall functionality of the app by presenting the user with post-game choices depending on the outcome of the round such as if they won or lost. The procedure first does this by being called when the user sprite collides with a sprite, the sprite that collided with the user sprite is passed onto the procedure as a parameter named "sprite". Through a selection statement the procedure then checks to see whether the parameter is in my "BlackPieces" list, if true then the user sprite is reset to its original starting position, then an alert dialog box is presented to the user with the option to either replay the game or finish their playthrough. If the initial selection statement fails, the secondary selection statement checks whether the user sprite collided with the end goal sprite being the white Queen sprite. If true then the user sprite is reset to its initial position, then an alert dialog box is presented to the user with the option to either replay the game with an increased difficulty or finish their playthrough.
5.) Design Process: I worked on the app in 4 steps. The first step was just getting the basic bulk of the code done and we ended up coding a decent amount. The second step we finished all of the code without testing the app. After we finished the bulk of the code the next day I decided there may be a problem with this code, so I double checked the code and anytime I clicked the arrow button I always got an error. We realized that there was a problem with some sprites and that they were extraneous, so we ended up removing them and then we retested the app and we were all set. There were no more errors and the code worked as planned with the token moving when we clicked the arrows and if you hit one of the obstacles then you are forced to go back to start or end the game. After this we did the last iteration which was fixing the user interface, so it looked nice. We made custom backgrounds for all of the screens and made the app more visually appealing for the users who would decide to play the game. User testing was used to find the error in the code which made us realize that we had extraneous sprites that weren’t necessary and it increased our perspective by making us double check the code and figure out how to solve the error and fix the program, so it worked as plan without popping up error messages.
6.) Collaboration and Teamwork: Collaboration and teamwork were on spot. There were two people in my group. It was me and my friend Richardo. Teamwork really helped make the assignment go by quicker because whatever the other person didn’t know the other person conveniently knew. Also whatever neither of us knew we used google to help us. My partner did about 55% of the work when I did about 45% of the work. My job was to help keep him on task because my partner is a master procrastinator and to help with the coding. My partner did some of the coding and he made all of the images, but he would have waited until the last day if I didn’t keep him on track. The team worked effectively and efficiently. We even finished the project 4 days earlier than the deadline which was on the 28th of April. All in all the project was a success because we finished the project early and it was a very well thought out program. Also, it reduced the amount of time it would have taken me to code it myself and make the images. So teamwork is really the dreamwork.
7.) Program Code: