Android: games against Maia (small model, no clocks)
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run

«Play with Maia» on the Databases screen and «Play on from here with Maia…» in
the move sheet: the strength (1100–1800), colour and name; Maia's 21 MB
downloaded there. The game is a mode of the game screen: Maia answers after a
person's pause (shared rules), take back, resign or abort, Maia's offer to
resign judged by Stockfish when it is there; the end card offers analysis,
rematch and saving. The game is written after each move: «back» puts it
aside, the Databases screen offers to go on with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-10-26 01:21:47 +03:00
parent 57cc4b2360
commit 66f86ae3e5
21 changed files with 1377 additions and 24 deletions

View file

@ -197,6 +197,19 @@ impl GameSession {
})
}
/// Adds `text` to the comments after the move at place `at` (its symbols kept).
pub fn add_comment(&self, at: u32, text: String) -> Result<Edited, ApiError> {
self.with(|g| {
let id = node(g, at)?;
let n = g.node(id).ok_or(ApiError::NoNode { place: at })?;
let nags = n.nags().to_vec();
let mut comments = n.comments_after().to_vec();
comments.push(text);
g.annotate(id, nags, comments)?;
Ok(edited(g, id))
})
}
/// Changed since it was opened or last saved.
pub fn is_modified(&self) -> bool {
self.with(|g| g.is_modified())