Skip to content

Commit

Permalink
Merge pull request #31 from sparshgup/main
Browse files Browse the repository at this point in the history
Fixed LeaderboardPage error due to score invalid type and updated website release version
  • Loading branch information
sparshgup authored May 6, 2023
2 parents f8bc385 + 65e6130 commit 22cad95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion just_dance_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def get_leaderboard_scores(filename):
in the CSV file.
"""
data = get_leaderboard(filename)
sorted_data = sorted(data[1:], key=lambda row: int(row[0]), reverse=True)
sorted_data = sorted(
data[1:], key=lambda row: int(float(row[0])), reverse=True
)
top_scores = [int(float(row[0])) for row in sorted_data]
return top_scores[:5]
4 changes: 2 additions & 2 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ <h1>Just Dance</h1>
<div class="flex-child2">
<div class="heading2">Download the game!!</div>
<div class="content2">
Visit our Just Dance Game release v1.1.1 on GitHub to obtain the source code </br>
and instructions on how to run the game at: <a href="https://github.com/olincollege/just-dance/releases/tag/v1.1.1">Just Dance Game - Olin College</a>
Visit our Just Dance Game release v1.1.2 on GitHub to obtain the source code </br>
and instructions on how to run the game at: <a href="https://github.com/olincollege/just-dance/releases/tag/v1.1.2">Just Dance Game - Olin College</a>
</div>
</div>
<div class="flex-child2">
Expand Down

0 comments on commit 22cad95

Please sign in to comment.