Game stats that reset every frame, inspired by immediate mode GUI.
gamedev bevy stats
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Testing for more base values.

+16 -14
+16 -14
src/lib.rs
··· 20 20 21 21 #[test] 22 22 fn default() { 23 - let mut h = Health { 24 - health_base: 10, 25 - health_bonus: 3, 26 - health_multiplier: 1.5, 27 - }; 23 + for base in 0..10 { 24 + let mut h = Health { 25 + health_base: base, 26 + health_bonus: 3, 27 + health_multiplier: 1.5, 28 + }; 28 29 29 - h.reset_modifiers(); 30 + h.reset_modifiers(); 30 31 31 - assert_eq!( 32 - h, 33 - Health { 34 - health_base: 10, 35 - health_bonus: 0, 36 - health_multiplier: 1.0, 37 - } 38 - ); 32 + assert_eq!( 33 + h, 34 + Health { 35 + health_base: base, 36 + health_bonus: 0, 37 + health_multiplier: 1.0, 38 + } 39 + ); 40 + } 39 41 } 40 42 }