2023-12-16 02:16:58 +00:00
|
|
|
# Specification of bgammon.org replay file
|
|
|
|
|
|
|
|
Replays are stored as .match files.
|
|
|
|
|
|
|
|
## Match format (.match)
|
|
|
|
|
|
|
|
A .match file contains one or more games concatenated together.
|
|
|
|
|
|
|
|
The games are prefixed with a table listing the index of each game.
|
|
|
|
|
|
|
|
### Index table
|
|
|
|
|
|
|
|
The index table consists of one or more lines in the following format:
|
|
|
|
|
|
|
|
`bgammon-replay <index>`
|
|
|
|
|
|
|
|
Games are in chronological order.
|
2023-12-16 03:22:59 +00:00
|
|
|
The index specifies the position of the first byte of the first line of a game.
|
|
|
|
The index is always eight digits in length with leading zeroes.
|
2023-12-16 02:16:58 +00:00
|
|
|
|
|
|
|
### Game
|
|
|
|
|
|
|
|
#### Metadata
|
|
|
|
|
2023-12-16 03:22:59 +00:00
|
|
|
The first line of the game is the metadata.
|
2023-12-16 02:16:58 +00:00
|
|
|
|
|
|
|
`i <player1> <player2> <total> <score1> <score2> <winner> <points> <acey>`
|
|
|
|
|
2023-12-16 03:22:59 +00:00
|
|
|
#### Events
|
2023-12-16 02:16:58 +00:00
|
|
|
|
2023-12-16 03:22:59 +00:00
|
|
|
The remaining lines of the game are the events.
|
2023-12-16 02:16:58 +00:00
|
|
|
|
2023-12-16 03:22:59 +00:00
|
|
|
Events are in the following format:
|
2023-12-16 02:16:58 +00:00
|
|
|
|
2023-12-16 03:22:59 +00:00
|
|
|
`<player> <event>`
|
2023-12-16 02:16:58 +00:00
|
|
|
|
|
|
|
##### Double
|
|
|
|
|
|
|
|
Accepted:
|
|
|
|
|
2023-12-16 03:22:59 +00:00
|
|
|
`1 d 2 1`
|
2023-12-16 02:16:58 +00:00
|
|
|
|
|
|
|
Declined:
|
|
|
|
|
2023-12-16 03:22:59 +00:00
|
|
|
`1 d 2 0`
|
2023-12-16 02:16:58 +00:00
|
|
|
|
|
|
|
##### Roll and move
|
|
|
|
|
|
|
|
Moves are always specified from player 1's perspective.
|
|
|
|
|
2023-12-16 03:22:59 +00:00
|
|
|
`1 r 5-3 13/8 24/21`
|