0
How would I create a score prediction program? I know some of the key elements but I want to keep it basic..
7 Respuestas
+ 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?
+ 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.
+ 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.
+ 7
Anytime.
+ 1
thanks I really appreciate this.. I'm only starting to learn coding now
0
predict before the game for example soccer
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