League Player Rank
Description:
There is a Sports League, where the committee is recording the scores of each player in every game.
The objective of this Kata is to determine who is the player on a particular given rank from the provided Player Standing List.
The rank criteria is determined depending who has the heighest score with the least number of games. In cases when there are multiple players having the same score and number of games, the rank will be determined on their position on the Players Standing List.
Example:
Player Standing List: 'Mike', 'Chris', 'Arnold'
Record Game Score: 'Mike' - 2
Record Game Score: 'Arnold' - 5
Record Game Score: 'Chris' - 5
Record Game Score: 'Mike' - 3
$player1 = playerRank(1, $this->standings);
In this example, The Players Standing List is shown as follows, Mike
, Chris
, Arnold
. All players have the same score (which is 5). Only Arnold
and Chris
had played only 1 game. The given rank is 1 in playerRank(1, $this->standings)
and since Chris
is 2nd and Arnold
is 3rd in the Players Standing List, Chris
is Rank 1.
Similar Kata:
Stats:
Created | Jul 26, 2018 |
Published | Jul 27, 2018 |
Warriors Trained | 132 |
Total Skips | 31 |
Total Code Submissions | 124 |
Total Times Completed | 4 |
PHP Completions | 4 |
Total Stars | 0 |
% of votes with a positive feedback rating | 50% of 2 |
Total "Very Satisfied" Votes | 0 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 0 |
Total Rank Assessments | 3 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |