Files
woggioni f17d328ed5 fix frontend board mapping, game-over handling, and WASM-4
- fix Xform yx and add a shared view-aware board_position helper
- add GTK automatic game-over, restart, status, and multi-capture selection
- pin librsvg to the 2.60 series to match GTK4/glib 0.20
- add WASM orientation, undo/redo/new/flip controls, and winner overlay
- replace WASM crown images with canvas paths and remove dead files/deps
- make WASM-4 playable with mouse input, crowns, winner handling, and correct mapping
- move the WASM-4 release profile to the workspace root
- clean up frontend dead code and update the README
2026-10-19 20:38:32 +00:00

35 lines
1.1 KiB
Rust

use glib::ExitCode;
use rdraught::{DraughtsGame, Move};
use std::mem::size_of;
fn main() -> ExitCode {
println!("move: {}", size_of::<Move>());
println!("game: {}", size_of::<DraughtsGame>());
// let boards = [[(Position::new(2, 4), Piece::CrownedRedPawn)]];
// for pieces in boards.into_iter() {
// let map = pieces.into_iter().collect::<HashMap<Position, Piece>>();
// let board = DraughtsBoard::new(|p| match map.get(&p) {
// None => Piece::NoPiece,
// Some(piece) => *piece,
// });
// println!("{:?}", board);
// for (pos, piece) in map.iter() {
// assert_eq!(*piece, board.get(*pos));
// }
// }
ExitCode::SUCCESS
// let mut pieces = HashMap::<Position, Piece>::new();
// pieces.insert(Position::new(2, 4), Piece::CrownedRedPawn);
// pieces.insert(Position::new(5, 5), Piece::CrownedWhitePawn);
// let game = DraughtsGame::new(
// |p| match pieces.get(&p) {
// None => Piece::NoPiece,
// Some(piece) => *piece,
// },
// Player::Red,
// );
// run(game)
}