UEWBot / dipvis

Django-based visualiser for tournaments for the boardgame Diplomacy
GNU General Public License v3.0
7 stars 5 forks source link

Highlight results for pairs of players #263

Closed UEWBot closed 1 year ago

UEWBot commented 1 year ago

With all the tournament games played by all the players in the database, it should be possible to find all the times a given pair of players has played before and what the results were. That seems like interesting background.

UEWBot commented 1 year ago

When we import from the WDD, we create PlayerGameResults, which record the results of a single game from one player's perspective. So there's no "historical game" in the database for these. Finding historical games between specified players therefore means matching up attributes (tournament_name, game_name, and date) unless we re-structure the database.

UEWBot commented 1 year ago

New page added. Now we just need to link to it from somewhere

UEWBot commented 1 year ago

I think we need a new form to select an opponent, which should be trivial. Need to be able to specify the QuerySet to use (either all Players or all Players playing in a specified Tournament - can do that by having init() take an optional Tournament parameter).

Then we add that form to both the TournamentPlayer details page and the Player background page.

UEWBot commented 1 year ago

We already have PlayerForm. Just need to add an init() method so we can modify the QuerySet.