From c9e7cef443c76539e2404f29469af00d95717d31 Mon Sep 17 00:00:00 2001 From: Henri Bourcereau Date: Thu, 25 Jan 2024 21:33:46 +0100 Subject: [PATCH] doc gnubg --- doc/blog/game-state-notation.md | 1 + store/src/board.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/blog/game-state-notation.md b/doc/blog/game-state-notation.md index e96ffee..9587a29 100644 --- a/doc/blog/game-state-notation.md +++ b/doc/blog/game-state-notation.md @@ -48,3 +48,4 @@ Non dénuée d'avantages : Backgammon notation : https://nymann.dev/2023/05/16/Introducing-the-Backgammon-Position-Notation-BPN-A-Standard-for-Representing-Game-State/ GnuBg : https://www.gnu.org/software/gnubg/manual/html_node/A-technical-description-of-the-Position-ID.html +- implémentation rust https://github.com/bungogood/bkgm/blob/main/src/position.rs diff --git a/store/src/board.rs b/store/src/board.rs index 506c8c3..9145b75 100644 --- a/store/src/board.rs +++ b/store/src/board.rs @@ -34,6 +34,7 @@ impl Board { Board::default() } + // maybe todo : operate on bits (cf. https://github.com/bungogood/bkgm/blob/a2fb3f395243bcb0bc9f146df73413f73f5ea1e0/src/position.rs#L217) pub fn to_gnupg_pos_id(&self) -> String { // Pieces placement -> 77bits (24 + 23 + 30 max) // inspired by https://www.gnu.org/software/gnubg/manual/html_node/A-technical-description-of-the-Position-ID.html