Skip to main content

Crate morpion_solitaire_records

Crate morpion_solitaire_records 

Source
Expand description

A curated corpus of Morpion Solitaire record games, embedded at compile time.

Each entry is (display name, id, MSR record). The id is the corpus file stem (e.g. "demaine31", matching records/<variant>/demaine31.json); the record is its JSON source — decode it with the morpion-solitaire-record crate (which reads both the JSON and the compact MS1: forms):

for (name, id, record) in morpion_solitaire_records::RECORDS {
    let game = msr::decode(record).unwrap();
    assert!(msr::validate(&game).is_ok());
    println!("{name} [{id}]: {} moves", game.moves.len());
}

The JSON files are the source of truth; the compact .msr, the rendered PNG/SVG (with the record embedded) and the Pentasol form are derived artifacts generated from them (see the workspace’s gen_record_artifacts example), not committed. Being embedded, the corpus works without a filesystem (e.g. in WebAssembly).

Constants§

RECORDS
The record games, as (display name, id, MSR JSON) triples, best first. The id is the corpus file stem. All are legal, terminal games (5T unless noted); each carries its provenance in the record’s source/author/transcribed_by fields. See the crate README.