[Pypentago-devel] GameHistoryManager.py ???
Status: Pre-Alpha
Brought to you by:
segfaulthunter
From: J. K. <ko...@fr...> - 2008-06-03 18:02:54
|
Hi all, Does it make sense to create a GameHistoryManager.py file kind of like the PlayerManager? I'm wondering if that is where the Game Logging code will go. I picture at the end of the game, the server, after detecting the win condition calls a "report_game" method; not sure if my format is correct there. If I'm right, the GameHistoryManager.report_game() method would have a couple goals: #1 - Log the game Log the Game into the game history table. #2 - Update the current_rating of both players Get previous game history for player 1 Build it into a list L Pass list to glicko2 function rc = RatingCalculator() #create the rating calculator object result = rc.CalculateNewRating( L, current_volatility, current_RD) #I think the Glicko code is close to working, if given proper input. Use returned list to save the new rating of the player back to Players table (probably using PlayerManager, right?) Repeat for player 2 Well, just wanted to get my thoughts down here. (I think the above makes the 2 public methods of Glicko2.py obsolete) Lets create a Gna Task if GameHistoryManager.py makes sense. Maybe I am just rushing things, if so, then disregard. I will be happy to work on something like that if it makes sense. Florian and I discussed doing a GameLog class, but Maybe it makes more sense in the /db/GameHistoryManager file. If there are no objections, I will begin working on this; however, if I am stepping on your toes Hardik, let me know and I will hold off and work on glicko-cleanup instead. Let me know. Thanks for your continued good communication. Kovacs |