20 lines
384 B
Rust
20 lines
384 B
Rust
|
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();
|
||
|
for sgf in games {
|
||
|
if let Ok(sgf) = sgf {
|
||
|
println!("{:?}", sgf.white_player);
|
||
|
}
|
||
|
}
|
||
|
}
|