I’ve been stuck on this issue for awhile now and can’t seem to get around it.
I am building a sport league app for me and my friends. There is a leaderboard which will show the total number of wins, draws, loses, etc, etc. Currently I have a data type that has a list of match ups with fields for home goals and away goals. My goal is to be able to calculate the total number of wins by any given team and display this in my leaderboard associated to the respected team.
I have UI with 2 input fields for the match ups where the user can input the home and away goals.
Anyone have any suggestions on how to calculate this?