Code Representation

Polished Final-logic Flowchart:

SPD flow chart

Draw Screen 1: This function doesn’t take any input or return arguments. The purpose of this function is to Draw the first screen of the game (after the menu) The player character moves around on this screen and accesses battles from this screen. This function also draws the player character.

Draw Screen 2: This function is a public member of the class RockPokemonScissors and it uses the private member variables, xPosition, yPosition, wins, and losses. This function displays the second screen of the game, including the two TA’s Maddy and TJ, the path that is outlined for the character, and a wins/losses counter. This function also draws the character to the screen with an updated location each time it is called.

Draw Screen 3: This function is a public member of the class RockPokemonScissors and it uses the private member variables, xPosition, yPosition, wins, and losses. This function displays the third screen of the game, including the final boss (Dr. Parke’s Cat), the path screen outline, and a wins/losses counter. This function also draws the character to the screen with an updated location each time it is called.

End Screen: This function is a public member of the class RockPokemonScissors and it does not use any member variables. This function clears the screen and writes information for the user to the screen. This function tells the user that they have won the game and have defeated the evil FEH Department, or that they have lost and they must try again. It also tells them that they can click anywhere to return to the main menu.

BatSeqY: This function does not take any input arguments or output values. The function contains the battle sequence the user has with UTA Yiyang. This is the introductory battle, so the user will always win.

BatSeqM: This function does not take any input arguments or output values, but the wins/losses variable that it shares a class with will be changed. The function contains the battle sequence for UTA Maddy. Maddy has pre programmed moves; if the user picks the same move as her, Maddy will chose the move that beats theirs making her one of the hardest opponents, second only to the boss.

BatSeqTJ: This function does not take any input arguments or output values, but the wins/losses variable that it shares a class with will be changed. The function contains the battle sequence for GTA TJ. TJ has pre programmed moves; if the user picks the same move as him, TJ will chose the move that loses to theirs making.

BatSeqC: This function takes the input argument wins, but has no output value. Depending on the number of wins the user was gained throughout the course of the game, the difficulty of the final boss will change. The more wins the easier it is to beat. There are 3 levels of difficulty. Difficulty 0 the boss always wins, 1 there is a chance you or the boss will win and the boss’s moves are generated randomly, 2 the user always wins.