Now with increment and decrement

This commit is contained in:
Greg Hellings
2025-02-25 15:36:58 -06:00
parent 0c7843b386
commit 93b2cb6447
5 changed files with 31 additions and 5 deletions
+9 -5
View File
@@ -9,10 +9,14 @@ fn main() {
let random_number: i32 = rand::rng().random_range(1..=20);
let random_number_str = format!("John.3.{}", random_number);
module.set_key_text(&random_number_str);
println!(
"Text John 3:{} is \"{}\"",
random_number,
module.render_text()
);
for i in 0..10 {
module.increment();
println!(
"Text John 3:{} is \"{}\"",
random_number + i,
module.render_text()
);
}
println!("==============================");
}
}