feat: add keep_highest method to Outcome

This commit is contained in:
2025-11-16 11:08:20 +01:00
parent 8c45bf629c
commit d29fa81fbb
4 changed files with 35 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
use oxidice_lib::dice::*;
fn main() {
let roll = Handful::grab(4, 6).roll();
print!("{roll} -> ");
let roll = roll.keep_highest(3).unwrap();
print!("{roll} -> ");
let roll = roll.sum().unwrap();
print!("{roll}");
println!();
}