From 961725d9d79ef9898f9fa6b5de5e9ee024801589 Mon Sep 17 00:00:00 2001 From: nat Date: Tue, 10 Dec 2024 15:30:45 -0800 Subject: [PATCH] feat: print resultant land after execution --- src/bin/ponderosa-cpu.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/bin/ponderosa-cpu.rs b/src/bin/ponderosa-cpu.rs index d0e80e9..0fa99d8 100644 --- a/src/bin/ponderosa-cpu.rs +++ b/src/bin/ponderosa-cpu.rs @@ -214,5 +214,14 @@ fn main() -> io::Result<()> { dbg!(tree.trunk); } + println!("Resulting World\n====="); + + for col_idx in 0..land.width { + for row_idx in 0..land.height { + print!("{}\t", land.map.get(&(col_idx, row_idx)).unwrap_or(&0u16)); + } + println!(); + } + Ok(()) }