Skip to content

Commit

Permalink
More interface changes
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbuddy committed Mar 15, 2024
1 parent fad868a commit bbb056e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Must export an object `game` with two functions, `initialState` and `processMove
```ts
initialState(setup: SetupState): GameUpdate
processMove(previousState: GameStartedState, move: Move): GameUpdate
reprocessHistory(setup: SetupState, moves: Move[]): {updates: GameUpdate[], movesCompleted: number}
reprocessHistory(setup: SetupState, moves: Move[]): ReprocessHistoryResult

type Player = {
id: string
Expand Down Expand Up @@ -91,6 +91,14 @@ type Move = {
position: number
data: any
}

type ReprocessHistoryResult = {
initialState: GameUpdate
updates: GameUpdate[]
movesCompleted: number
error?: string
}

```

### UI
Expand Down

0 comments on commit bbb056e

Please sign in to comment.