Recover the board

The test deliberately leaves the final turn notification unread and closes the database. It reopens the same file through the generated Go SDK. The board query returns exactly one piece, Bob’s black king on 18. A reconnecting player can recover the position even after missing the animation.

Go example

go329 B
func recoverBoard(t *testing.T, config stardust.Config) {
	reopened := must(sdk.Open(config))
	defer reopened.Close()
	rows := must(reopened.CheckersBoards.Board())
	if len(rows) != 1 {
		t.Fatal(rows)
	}
	b := rows[0]
	if b.Number != 18 || b.Rank != "king" || b.Color != "black" {
		t.Fatal("unexpected recovered board", b)
	}
}