fish-lib 0.2.3

A work-in-progress fishing game library containing the game/storage logic for a discord fishing game I'm working on.
Documentation
use serde::{Deserialize, Serialize};

#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize)]
pub struct UsageComponent {
    #[serde(default)]
    times_used: u64,
}

impl UsageComponent {
    pub fn new(times_used: u64) -> Self {
        Self { times_used }
    }

    pub fn get_times_used(&self) -> u64 {
        self.times_used
    }

    // Events
    pub fn on_use(&mut self, times: u64) {
        self.times_used = self.times_used.saturating_add(times);
    }
}