diff options
author | Daniel Schadt <kingdread@gmx.de> | 2018-04-27 13:02:04 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2018-04-27 13:02:04 +0200 |
commit | 8423b0c401a484314241391f2f78d129eef704c4 (patch) | |
tree | 1ce1ae0730f0dcb98e5f5c43213a77a24a2706c3 /src/statistics/boon.rs | |
parent | 85e203629580192413dbaa8156c2b4ca351c4bfc (diff) | |
download | evtclib-8423b0c401a484314241391f2f78d129eef704c4.tar.gz evtclib-8423b0c401a484314241391f2f78d129eef704c4.tar.bz2 evtclib-8423b0c401a484314241391f2f78d129eef704c4.zip |
add boon tracking basics
Diffstat (limited to 'src/statistics/boon.rs')
-rw-r--r-- | src/statistics/boon.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/statistics/boon.rs b/src/statistics/boon.rs index 4d0348e..912fdb6 100644 --- a/src/statistics/boon.rs +++ b/src/statistics/boon.rs @@ -107,6 +107,9 @@ impl BoonQueue { /// /// * `duration` - The amount of time (in milliseconds) to simulate. pub fn simulate(&mut self, duration: u64) { + if duration == 0 { + return; + } let mut remaining = duration; match self.boon_type { BoonType::Duration => { @@ -138,6 +141,11 @@ impl BoonQueue { self.queue.clear(); } + /// Checks if any stacks are left. + pub fn is_empty(&self) -> bool { + self.queue.is_empty() + } + /// Calculate when the stacks will have the next visible change. /// /// This assumes that the stacks will not be modified during this time. |