Справочник: "Without moves" in the start position, no "comparing" text

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-10-19 23:54:48 +03:00
parent 6b1523b1b9
commit 5d6a73aff5
3 changed files with 28 additions and 5 deletions

View file

@ -2063,6 +2063,22 @@ const ROWS: &[[&str; 6]] = &[
"Partidas que terminaron en esta posición (abandono, tablas, mate, tiempo)",
"Partite finite in questa posizione (abbandono, patta, matto, tempo)",
],
[
"Without moves",
"Без ходов",
"Sans coups",
"Ohne Züge",
"Sin jugadas",
"Senza mosse",
],
[
"Games of the database with only the players and the result, no moves",
"Партии базы, у которых записаны только игроки и результат, без ходов",
"Parties de la base avec seulement les joueurs et le résultat, sans coups",
"Partien der Datenbank nur mit Spielern und Ergebnis, ohne Züge",
"Partidas de la base solo con los jugadores y el resultado, sin jugadas",
"Partite della base con solo giocatori e risultato, senza mosse",
],
[
"Checking engine…",
"Проверка движка…",

View file

@ -975,7 +975,6 @@ impl Reference {
// while it is worked out, so nothing jumps).
let line = main_line(game);
let book = self.book_for(&path, &line).cloned();
let failed_book = self.book_failed.as_ref() == Some(&(path.clone(), line.clone()));
// The novelty: the first move of the game no other game of the database played
// (the line keeps its height while it is worked out, so nothing jumps).
let novelty = book.as_ref().and_then(|b| match b.last {
@ -998,9 +997,10 @@ impl Reference {
}
}
(Some(_), None) => {}
(None, _) if failed_book => {}
// Still being worked out: an empty line of the same height, so the tables
// do not jump when the novelty appears.
(None, _) => {
ui.label(RichText::new(tr("Comparing the game with the database…")).weak());
ui.label(" ");
}
});
// The game itself is in the database (maybe annotated there): open it.
@ -1110,6 +1110,7 @@ impl Reference {
let books = found.books;
let total: u32 = out.moves.iter().map(|m| m.tally.games).sum::<u32>() + out.ended.games;
let mut action = None;
let start = chess_import::position::same_position(pos, &Chess::default());
let rows = out.moves.len() + usize::from(out.ended.games > 0);
if rows == 0 {
// The games go on with a null move (a teaching "--"), which is not a move.
@ -1207,6 +1208,8 @@ impl Reference {
.to_move(pos)
.map(|m| move_label(pos, m))
.unwrap_or_else(|_| s.san.clone()),
// In the start position "ended" are games recorded without moves.
None if start => tr("Without moves").to_owned(),
None => tr("Game over").to_owned(),
};
row.col(|ui| {
@ -1220,6 +1223,10 @@ impl Reference {
let r = ui.add(egui::Label::new(text).selectable(false));
if in_game {
r.on_hover_text(tr("The move played in this game"));
} else if stat.is_none() && start {
r.on_hover_text(tr(
"Games of the database with only the players and the result, no moves",
));
} else if stat.is_none() {
r.on_hover_text(tr(
"Games that ended in this position (resignation, draw, mate, time)",

View file

@ -19,7 +19,7 @@
Под выбором базы:
- строка позиции: «Ход белых · после 4…Nc6 · в партии 5.Nb5»;
- теория (строка держит высоту, пока считается: «Сверяю партию с базой…»);
- новинка (пока считается, строка пустая, но держит высоту);
- «Эта партия есть в базе — открыть», если в базе нашлась копия: партия с теми же игроками (фамилии) и годом, доходящая до финальной позиции этой. Тренеру ценно открыть, например, комментированную версию. У пустой партии копий и теории нет.
Копии партии и сама партия (если она из этой базы) не входят в «теорию» и в таблицу партий; в счётчиках ходов остаются, как в ChessBase.
@ -33,7 +33,7 @@
| 5.Nc3 | 70 608 | 74 % | ▕██▒▒░░▏ | 55 % | 2236 | 2025 | Carlsen, Caruana |
- **Ход** — SAN с номером; **Партий** и **%** — сколько партий сыграли ход; **Результат** — полоса белые/ничьи/чёрные (как на доске поиска), **Белые** — очки белых в процентах; **Ср. Эло** — средний рейтинг партий, где известны оба; **Год** — последний; **Лучшие игроки** — две фамилии сильнейших (по рейтингу в партии) игроков, сыгравших этот ход.
- Последняя строка — «Конец партии»: столько партий закончилось в этой позиции (сдача, ничья, мат, время).
- Последняя строка — «Конец партии»: столько партий закончилось в этой позиции (сдача, ничья, мат, время). В начальной позиции это партии, записанные без ходов (только игроки и результат), строка называется «Без ходов».
- Ход, сыгранный в партии, отмечен «⏵» и полужирным.
- Для книги (большинство партий без результата) — «Главы» вместо «Партий», без колонок результата, очков и Эло.
- **Один клик** выделяет ход: синяя стрелка на доске, таблица партий ниже показывает только партии с этим ходом. Повторный клик снимает выделение. **Двойной клик** играет ход в партии: переход, если такой ход в партии есть, иначе новый вариант (Ctrl+Z отменяет).