diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 2b4aca7..28558eb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,5 +2,8 @@ mod dice; fn main() { println!("Rolling d20:"); - println!("{}", dice::roll_die(20)); + match dice::roll_formula("d20") { + Some(result) => println!("{}", result), + None => eprintln!("Error: Invalid roll formula, or die roll otherwise failed.") + } } |