better example program
This commit is contained in:
14
src/bin/bitsy-validate.rs
Normal file
14
src/bin/bitsy-validate.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
extern crate bitsy_parser;
|
||||
use bitsy_parser::game::Game;
|
||||
use bitsy_parser::image::Image;
|
||||
use std::{env, fs};
|
||||
|
||||
fn main() {
|
||||
let input_file = env::args()
|
||||
.nth(1)
|
||||
.expect("No input path specified. Usage: `smiley infile outfile`");
|
||||
|
||||
Game::from(fs::read_to_string(input_file).unwrap()).unwrap();
|
||||
|
||||
println!("OK!");
|
||||
}
|
||||
Reference in New Issue
Block a user