In the puzzles of the game in the game score how you can determine with the moves and the remaining time

I am using an android puzzle game app. in this application, one level is completed, then get the number of steps and the remaining level completion in time. The reached completion level in the dialog box shows the progress of the next level, then the number of moves and the remaining time in each value of the level value in this todisplay dialog (number of moves + recovery time) ...

((TextView) findViewById (R.id.MovesTextView)) SetText ("Move -" + moves). ((TextView) findViewById (R.id.ScoreTextView1)) SetText ("Time -" + (time / (1000 * 60)) + ":" + ((time% (1000 * 60)) / 1000)) ;.

how can this problem be implemented, please send any solution for urgent

+3
source share
1 answer

If I understand you correctly, do you want to make an assessment a function of the remaining time and overall moves? Therefore, the task is to find an algorithm f(time, moves).

Scoring is usually not an exact science. You could solve it mathematically, but the best solution is fair; give players an assessment to complete the level, and then give a bonus in proportion to how good they are compared to other players.

, . , , average time per move, total number of moves time remaining, . , , , f(time, moves)

:

level_score = level * 100;
max_bonus = 100000;
bonus_score = max_bonus / (time_taken + moves_taken + level*10);
score = level_score + bonus_score;
+2

Source: https://habr.com/ru/post/1772813/


All Articles