Closed StormGull closed 8 years ago
Let's go for a schema like this:
Tablename: MoveHistory GAME_ID: long MOVE_TIMESTAMP: timestamp (date or datetime in java) USER_ID: long (foreign key to users table) PIECE_ID: int/long (however we reference pieces in the game) MOVE: String (serialized ordered list of the coordinates in the move)
Also, let's only audit valid moves in this history. Invalid ones won't count so no point in showing them in step-by-step game history. We can still record these in some kind of log if we realllllly want.
I added start, quit, and join events to the game so we have those officially timestamped and part of the record. This was just done by making the pieceId nullable.
Need to persist the audit logs in database. Recommended format? I believe we discussed: GameID: int
[How do we do the time stamp? Following the Java date (which we could stuff this into for use with sorting, if we want, we could use the following] Year: int Month: int Day: int Hour: int Minute: int Second: int
Move: String