AAHB / mathdoku

Automatically exported from code.google.com/p/mathdoku
0 stars 0 forks source link

Store statistic related data in database #127

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
All statistic related data should be stored in a database instead of in 
separate game files. 

For now we will need just one table containing following information:
 * unique game-id (long)
 * Game signature (string)
 * Gridsize (int) ==> this can be retrieved from the signature but it will be more efficient to have it available as separate field.
 * Time elapsed (long)
 * Moves count (int)
 * Undo count (int)
 * Revealed cells count (int)
 * Revealed cage count (int)
 * Revealed solution (boolean)
 * Solved (boolean)

Advantages of this solution:
 * Even if multiple copies of the gamefile exist, all statistics will be totalled as the statistics are measured per grid signature.
 * Gamefiles and previews can be removed without changing the statistics.
 * Statistics can be recalculated and changed in the future as the base data is stored.

For this moment I have decided not to store the entire gamefile into the 
database as it contains intermediate information like the moves/undo 
information which has no long term value.

This enhancement is need for implementing a statistics activity.

Original issue reported on code.google.com by paul.din...@gmail.com on 5 Apr 2013 at 1:47

GoogleCodeExporter commented 8 years ago
Also store:
 * datetime first move
 * datetime last move

In case we are going to allow replay of a solved game, we should not update the 
statistics.

Original comment by paul.din...@gmail.com on 5 Apr 2013 at 1:51

GoogleCodeExporter commented 8 years ago
Existing game files will NOT be converted to the statistics. It is too 
complicated in case we want to handle multiple gamefiles for the same grid. 
Also the statistics will not initialized correctly as not all data is available.

Original comment by paul.din...@gmail.com on 5 Apr 2013 at 3:35

GoogleCodeExporter commented 8 years ago
Resolved in revision216. In development mode, the game statistics will be shown 
when
tapping the game seed below the grid.

Original comment by paul.din...@gmail.com on 6 Apr 2013 at 3:15

GoogleCodeExporter commented 8 years ago
Unfortunately the issue has not been verified explicitly by an independent 
tester.

Original comment by paul.din...@gmail.com on 8 Sep 2013 at 10:48