Add a color terminal renderer

This commit is contained in:
2020-07-12 23:00:54 -07:00
parent 52c2b5be5a
commit 80cb3a9d52
3 changed files with 25 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
use coremem::SimState;
use coremem::render::NumericTermRenderer;
use coremem::render::ColorTermRenderer;
use coremem::consts;
use std::{thread, time};
@@ -12,7 +12,7 @@ fn main() {
state.impulse_b(15, 1.0/consts::C);
state.impulse_e(15, 1.0);
loop {
NumericTermRenderer.render(&state);
ColorTermRenderer.render(&state);
state.step();
thread::sleep(time::Duration::from_millis(100));
}