//! Example of running built-in shell

extern crate boolnetevo;

use std::process;

use boolnetevo::{
    BitransformRegister,
    Evolver
};

fn app() -> Result<(), String> {
    let register = BitransformRegister::new_default();
    let mut evolver = Evolver::new_default(&register)?;

    evolver.shell(&register)?;

    Ok(())
}

fn main() {
    process::exit(match app() {
        Ok(..) => 0,
        Err(s) => {
            eprintln!("Error: {}", s);
            1
        }
    });
}
