0

How would I create a score prediction program? I know some of the key elements but I want to keep it basic..

25th Apr 2017, 6:31 PM
Chad
7 odpowiedzi
+ 8
What do you mean by 'score PREDICTION'? You want to predict what the players score will be before the game starts? Or just keep track of his score?
25th Apr 2017, 7:12 PM
Rrestoring faith
Rrestoring faith - avatar
+ 7
If the game restarts after every load: you may have to take the average score of a bunch of games. So the predicted score would be constantly the same. If the game saves (or atleast his scores), so you're predicting based on the players skill level, keep track of his average score. if each player has certain skills in soccer, like speed, defence, you can predict which team is going to win based on stats (and maybe win/loss rate) Perhaps the guess for the players score could be his average dependant on the difference in each teams skills. Then the other teams score could be based on the difference in team skills and players average score. So the overall prediction would then be: players prediction, other teams prediction. You'd likely have to come up with your own formula though.
25th Apr 2017, 7:25 PM
Rrestoring faith
Rrestoring faith - avatar
+ 7
If you want random guesses you could use Math.random(); Which gives a random number from 0-1; int team1Score = (int)(Math.random()*MAX_SCORE); // the do same for team2 Predict which is going to win based on whichever one is larger.
25th Apr 2017, 7:31 PM
Rrestoring faith
Rrestoring faith - avatar
+ 7
Anytime.
25th Apr 2017, 7:41 PM
Rrestoring faith
Rrestoring faith - avatar
+ 1
thanks I really appreciate this.. I'm only starting to learn coding now
25th Apr 2017, 7:38 PM
Chad
0
predict before the game for example soccer
25th Apr 2017, 7:20 PM
Chad
0
Okay I understand but say I want it random and basic where it would give me the score 1-0 for team 1 winning instead of me going into depth like you did which I understand.. so I would in the coding put win and lose and the score and it should randomly generate that
25th Apr 2017, 7:29 PM
Chad