- MVVM following Android architecture
- Prepopulate database with teams
- Prepopulate database with players (from json file inside the application)
- Prepopulate database with generated fixtures, based on the teams (double round robin with home and away fixture)
To generate the result for each fixture:
- Attack strength -> Number of goals scored by homeTeam last season divided by the number of average number of scored goals (in the last season for all teams)
- Defence strength -> Number of goals conceded by awayTeam last season divided by the number of average number of conceded goals (in the last season for all teams)
- Repeat (1) and (2) but reverting the teams in each step
- Calculate the Probability mass function for each of the occurrences (number of goals) based on the attack and defense strenghts
- Depending on the probability of each, attribute a weight and randomize the number of goals for each team
You can try the APK in Football Sim APK
- The mutual results were not taken into account for the teamStandings
- The ratings of each team could be improved and taken into account for the results of each fixture (eg. the rating of each team player could add a random multiplier used in the results)
- Can't access past results (once you generate a new set of fixtures, the previous ones are deleted) . Initially I had a competitions and competition_phase table to escalate into several seasons/competitions but ended going with the easier and faster approach
- Application was fixed to Portrait (as I didn't have the time to handle configuration changes)