Closed Microwonk closed 11 months ago
I'm going to just merge this and do the changes myself.
Regarding reset_count
- this is what I'm going to do:
reset_count
will set the number to 1 - unless it's already zero, in which case it'll leave it as zero. This is the usual usecase.reset_count_to
, I'll create a method named get_count_mut
which will return a mutable reference to the count. It'll will return an Option<&mut usize>
, so if the character is grounded it'll return None
and expose the fact that the counter cannot be altered for grounded characters.
I'm using this design because I figure that if someone is interested in setting it to something other than what reset_count
does - they'll probably want to check the current value (e.g. in order to decrement it by one)
Documentation and examples provided, airborne functions are referencing the discussion on #31.