2026-10-18 01:54:06 +03:00
|
|
|
// No console window for release builds on Windows.
|
|
|
|
|
#![cfg_attr(all(windows, not(debug_assertions)), windows_subsystem = "windows")]
|
|
|
|
|
|
|
|
|
|
mod analysis;
|
|
|
|
|
mod app;
|
|
|
|
|
mod assets;
|
|
|
|
|
mod board;
|
ChessPenguin 0.5.0: find games by position on a board
The "Board" pane next to the game list (Ctrl+B): moves played on it filter
the list to the games that reach the position by any move order, together
with the filters; the moves played next are listed with games, a results
bar, average rating and last year. Games reached by another order are
marked and "only this order" narrows the list; strongest games first.
A game opens at the found position; "Find in database" (Ctrl+Shift+F)
searches the position of the game on screen.
Large ChessBase databases: a fast main-line walk (moves built from the
board), pruning by material and pawns, the .cbb search booster when valid;
Mega Database: 0.4 s for the starting position, under 0.1 s deeper.
PGN databases and books: positions of all games, variations included,
kept in memory once built.
Also: × to clear filter and search fields; "Open as a new game" opens at
the last move; the "Moves" column is now "Length".
Docs: decision 13, design (docs/design/board-search.md), research
(position-search, position-index), dev notes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 08:42:08 +03:00
|
|
|
mod board_search;
|
2026-10-19 09:33:37 +03:00
|
|
|
mod engine_download;
|
|
|
|
|
mod engine_offer;
|
2026-10-18 11:53:30 +03:00
|
|
|
mod engines;
|
2026-10-19 12:21:09 +03:00
|
|
|
mod examples;
|
2026-10-18 01:54:06 +03:00
|
|
|
mod game_view;
|
|
|
|
|
mod i18n;
|
ChessPenguin 0.4.0: large ChessBase databases with a filter panel
Mega Database (11.7 million games) opens in under a second: a .cbh with
20,000 records or more is read in place, a game is converted to PGN when
opened. Filter panel on the right (player with suggestions, colour,
opponent, tournament, annotator, years, Elo rule, result, ECO, moves,
comments, variations), applied live in the background with cancellation.
Fixes: a ChessBase game unreadable from its first move (Chess960) crashed
the import; databases mixing UTF-8 and single-byte texts were decoded as
Cyrillic.
Docs: decision 12, design (docs/design/large-databases.md), format research
and acceptance criteria, QA report 2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 01:02:36 +03:00
|
|
|
mod large_db;
|
2026-10-18 01:54:06 +03:00
|
|
|
mod library;
|
|
|
|
|
mod notation;
|
Game analysis: whole-game engine review with graph, report and notation marks
- Separate background engine job over the main line (go nodes N), live engine
paused meanwhile; header button with progress/cancel, Shift+A.
- Lichess-method metrics: win %, move/game accuracy, inaccuracy/mistake/blunder,
ACPL, accuracy per game phase.
- Evaluation graph under the board, Report tab, engine badges and better lines
in the notation (preview on click), launch dialog with quality/threads/memory
and time estimate.
- Results cached in ~/.cache/chesspenguin/analysis; [%eval] read from PGN.
- Write analysis to the game as one undo step (chess-core: Game::annotate,
Game::edit_group).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 11:03:23 +03:00
|
|
|
mod report;
|
|
|
|
|
mod review;
|
2026-10-18 01:54:06 +03:00
|
|
|
mod settings;
|
|
|
|
|
mod settings_ui;
|
|
|
|
|
mod sound;
|
2026-10-18 14:00:19 +03:00
|
|
|
mod viewed;
|
2026-10-18 01:54:06 +03:00
|
|
|
mod widgets;
|
|
|
|
|
|
|
|
|
|
fn main() -> eframe::Result {
|
2026-10-19 19:07:47 +03:00
|
|
|
// `chesspenguin --bench <database> [report.txt]`: timings instead of the window
|
|
|
|
|
// (`docs/dev/import.md`, "Замер на другой машине").
|
|
|
|
|
let args: Vec<std::ffi::OsString> = std::env::args_os().skip(1).collect();
|
|
|
|
|
if args.first().is_some_and(|a| a == "--bench") {
|
|
|
|
|
let Some(db) = args.get(1) else {
|
|
|
|
|
eprintln!("usage: chesspenguin --bench <database> [report.txt]");
|
|
|
|
|
std::process::exit(2);
|
|
|
|
|
};
|
|
|
|
|
let cache = settings::Settings::cache_dir().map(|d| d.join("boosters"));
|
|
|
|
|
let result = match args.get(2) {
|
|
|
|
|
Some(file) => std::fs::File::create(file)
|
|
|
|
|
.and_then(|mut f| chess_import::bench::run(db.as_ref(), cache.as_deref(), &mut f)),
|
|
|
|
|
None => chess_import::bench::run(db.as_ref(), cache.as_deref(), &mut std::io::stdout()),
|
|
|
|
|
};
|
|
|
|
|
if let Err(e) = result {
|
|
|
|
|
eprintln!("bench: {e}");
|
|
|
|
|
std::process::exit(1);
|
|
|
|
|
}
|
|
|
|
|
return Ok(());
|
|
|
|
|
}
|
2026-10-18 01:54:06 +03:00
|
|
|
let options = eframe::NativeOptions {
|
|
|
|
|
viewport: egui::ViewportBuilder::default()
|
|
|
|
|
.with_app_id("io.github.vrubelroman.chessPenguin")
|
|
|
|
|
.with_title("ChessPenguin")
|
|
|
|
|
.with_inner_size([1400.0, 900.0])
|
|
|
|
|
.with_min_inner_size([900.0, 600.0])
|
|
|
|
|
// X11 uses this; on Wayland the icon comes from the .desktop entry matching the app id.
|
|
|
|
|
.with_icon(
|
|
|
|
|
eframe::icon_data::from_png_bytes(include_bytes!("../assets/icon-256.png"))
|
|
|
|
|
.unwrap_or_default(),
|
|
|
|
|
),
|
|
|
|
|
..Default::default()
|
|
|
|
|
};
|
|
|
|
|
eframe::run_native(
|
|
|
|
|
"ChessPenguin",
|
|
|
|
|
options,
|
|
|
|
|
Box::new(|cc| {
|
|
|
|
|
assets::install(&cc.egui_ctx);
|
|
|
|
|
Ok(Box::new(app::App::new(&cc.egui_ctx)))
|
|
|
|
|
}),
|
|
|
|
|
)
|
|
|
|
|
}
|