You're going to write some code to manage a scoreboard for a game.
The scoreboard will be a hash called %HighScoreBoard::Scores
.
The keys of the hash will be the names of the players, and the values will be their scores.
Modify the HighScoreBoard::set_player_scores
subroutine, which takes player names and scores as arguments, to set the players' scores in the %HighScoreBoard::Scores
hash.
Modify the HighScoreBoard::get_player_score
subroutine, which takes a player name as an argument, to return the player's score from the %HighScoreBoard::Scores
hash.
Modify the HighScoreBoard::increase_player_scores
subroutine, which takes players names and scores as arguments, to increase the players' scores in the %HighScoreBoard::Scores
hash by the given score.
Modify the HighScoreBoard::sort_players_by_name
subroutine to return the players names in the %HighScoreBoard::Scores
hash sorted by their name.
Modify the HighScoreBoard::sort_players_by_score
subroutine to return the players names in the %HighScoreBoard::Scores
hash sorted by their score.
Modify the HighScoreBoard::delete_player
subroutine, which takes a player name as an argument, to delete the player from the %HighScoreBoard::Scores
hash.
Sign up to Exercism to learn and master Perl with 5 concepts, 65 exercises, and real human mentoring, all for free.