monorepo/sgf/src/bin/read_sgf.rs

16 lines
350 B
Rust
Raw Normal View History

use sgf::parse_sgf_file;
use std::path::PathBuf;
use std::env;
fn main() {
let mut args = env::args();
let _ = args.next();
let file = PathBuf::from(args.next().unwrap());
println!("{:?}", file);
let games = parse_sgf_file(&file).unwrap();
2024-03-26 12:46:54 +00:00
games.into_iter().flatten().for_each(|sgf| println!("{:?}", sgf.white_player));
}