diff --git a/README.md b/README.md index dccb234..fc3cb1a 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,20 @@ Adjacent points without stones are very important to the state of a point as wel ![Image of Game logic](public/game-logic.png) +### Game Records +For the moment, game records are modeled as a list where each move has the type `{player: , pos: {x: , y: }}`. + +The database `move` table contains additional information `number`, `game_record`, and `prior_move` in addition to a foreign key for a `game` row. `number` represents the move number in a game record (for now this corresponds to list position), `game_record` is a boolean representing whether the move was 'official' or is an alternate move used in study, and `prior_move` is a reference to another `move` row allowing for the construction of a tree model for the game (see [Expanding this representation](#expanding-this-representation), below.) + +There is a backend service that processes this list of moves into a current board state ([Modeling Game State](#modeling-game-state).) On the frontend, users have the option of expanding a menu to view the move order in the format below. + +![Game Record: Black and white 19x19 grid with moves represented as circles filled in with stone color and marked with move number. Below the grid is an overflow area for moves made at previously played points in the format /[new move number and color at old move number and color/]](public/game-record.png) + +This is a customary representation of game records printed in Go literature. A frontend service processes the list of moves and plots each move onto a `` element drawn to resemble the grid lines on a board, with moves that are placed at prior points plotted on an additional `` element below. + +#### Expanding this representation +This representation will be expanded when support for alternate game paths is added. Alternate game paths will allow users to study completed games by playing out the consequences of moves not in the completed game. This feature will require a tree structure for the game record where moves on the main line are referred with a `main` property on each move node and alternate moves with any number of alternate references. + ### Caching multiple in-progress games ![Image of Game module in context](public/game-module.png) diff --git a/public/game-record.png b/public/game-record.png new file mode 100644 index 0000000..8ada837 Binary files /dev/null and b/public/game-record.png differ