uchicago-cs / chigame

BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Displaying Historical Information on a user view #365

Closed AndrewM131 closed 9 months ago

AndrewM131 commented 9 months ago

This pull request addresses issue #300 where it aims to display the correct historical information such as games won and such to a view where any view can access it.

AndrewM131 commented 9 months ago

Update: I implemented the code such that there is statistics for matches played, matches won, tournaments played, tournaments won. I added the attributes in views.py in the users folder. I also went into userprofile_detail.html and added a link to the user's stats. The button works and goes to the user's stats. This can be accessed by any user if they go on the user's profile.

AndrewM131 commented 9 months ago

I implemented the requested changes, but my only comment is that a user can be in a match if assigned by an admin, and not be in a lobby. I think there should be some functionality in the future to require a lobby for a match just so a person can't have matches won, but no matches played due to it being tied to lobbies.

24raniwalar commented 9 months ago

Added back remove friend functionality; got removed elsewhere in another PR.

AndrewM131 commented 9 months ago

Closing comment: In this PR, we created a view that can be accessed in the profile of a user that displays the stats of a user, so for example, how many matches a user has been in, how many matches they've won, how many tournaments they've participated in and how many have they won. This is visible to any user when looking at another user's profile. One thing is that match count is linked to lobby, and since an admin can manually add a user to a match without a lobby, there should be something in the future that mandates a lobby for a match such that the numbers stay consistent. Also in the future, there should be more stats, such as rank in Chigame website, and maybe win rate, and things like that. Team contributions can be found in issue closing statement.

elizabethli31 commented 9 months ago

Issue Score: Excellent

Comments: Great work using models from other teams to complete this PR!