The first assumption was that the program will be applied for use on the FEH Proteus. The user is using a stylus that will allow them to accurately select parts of a menu. The player has at least a basic understanding of and interest in the sport of soccer.
First, there were a few important classes: player, keeper, and team. Player contained the attacking skill level, defending skill level, player morale, and player name for each player object. Keeper contained the name, saving skill level, and player morale for each keeper object. Team contained the team name, team morale, manager name, and four players and a goalkeeper. The attacking and defending skill levels are used to determine the probability of a player getting a shot off, while the saving skill level is used to determine the probability of a shot being saved. Morale affects a player’s in-game skill levels.
There is a function called pregame, which takes in a team object and gives the manager a chance to change their team’s morale with a pep talk of their choice. The next function, game, takes home and away team objects as well as total wins and losses. This function simulates a 90 minute game and displays the results of each minute as well the result of the game at the end. Intro takes in four floats to track touch position of the user and lets the user choose which home and away team will be used in the game. Rules takes in no parameters and tells the user the rules of the game. Statistics takes in wins and losses and displays these statistics to the user. Credits takes in no parameters and displays the game credits.
The program is a basic single game simulator which is limited by its lack of user input and objective gaining. There could be an improvement in the graphics and interactivity of the game.
Pseudocode:
There are four teams for the user to chose from. Each time the user plays a game, they chose their team (home) and opponent (away). Each team has pre-set players that have skill stats. They also have morale stats that affect players scoring abilities. When a player scores or gets a shot saved, their morale is changed accordingly. Before each game the manager has a team briefing that affects the team morale for the better or the worse. Each minute of the game of to see if each player scores. If a player scores, the game score is adjusted and the new score is displayed. After the game is over, the final score is displayed. This process carries on as long as the proteus is activated.