gameserv: model the domain with enums (GameType/Side/Status/Outcome/Board), zero-alloc grid moves
All checks were successful
CI / check (push) Successful in 3m54s
All checks were successful
CI / check (push) Successful in 3m54s
This commit is contained in:
parent
108c15e95a
commit
cfe05481d6
3 changed files with 472 additions and 337 deletions
|
|
@ -569,7 +569,9 @@ pub fn encode(st: &State) -> String {
|
|||
}
|
||||
|
||||
/// Inverse of [`encode`]. On malformed input (fewer than 4 comma parts) returns
|
||||
/// [`initial`].
|
||||
/// [`initial`]. The referee keeps a live `State`, so this is only exercised by the
|
||||
/// roundtrip test today — kept as part of the complete, perft-verified engine.
|
||||
#[allow(dead_code)]
|
||||
pub fn decode(enc: &str) -> State {
|
||||
let mut st = State {
|
||||
board: [EMPTY; 64],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue