You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
407 B

use moving_targets::*;
fn main() {
let mut field = Field::new();
println!("{:?}", field.pop());
field.push(Target { size: 12, xp: 2 });
println!("{:?}", *field.peek().unwrap());
field.push(Target { size: 24, xp: 4 });
println!("{:?}", field.pop());
let last_target = field.peek_mut().unwrap();
*last_target = Target { size: 2, xp: 0 };
println!("{:?}", field.pop());
}