diff options
author | Katharina Fey <kookie@spacekookie.de> | 2020-01-29 17:10:36 +0000 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2020-01-29 17:10:36 +0000 |
commit | eb86eb246e5a98867d0d8766a236d73b44bb46c7 (patch) | |
tree | 9e209a9cb5b29ddf7e30ec14ce474142acab84be /src/stats.rs | |
parent | 977dadaa07f86a3ebabedb425cc6f68b2e14d569 (diff) |
Adding some more packet sending utilities
Diffstat (limited to '')
-rw-r--r-- | src/stats.rs | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/stats.rs b/src/stats.rs index 7755821e4742..99340f2989dc 100644 --- a/src/stats.rs +++ b/src/stats.rs @@ -8,7 +8,7 @@ pub type Money = u16; /// The cost of doing business -pub mod cost { +pub mod costs { use super::Money; use crate::data::{Level, PacketType, Upgrade}; @@ -150,3 +150,34 @@ pub mod gains { } } } + +pub mod strengths { + use crate::data::Level::{self, *}; + + /// Determine the maximum amount of resources for a compute packet + pub fn compute_max(lvl: Level) -> u16 { + match lvl { + One => 65, + Two => 120, + Three => 250, + } + } + + /// Determine the step size by which a computation advances + pub fn compute_step(lvl: Level) -> u16 { + match lvl { + One => 7, + Two => 20, + Three => 32, + } + } + + /// Determine the reward gained from processing a payload packet + pub fn payload_reward(lvl: Level) -> u16 { + match lvl { + One => 70, + Two => 150, + Three => 275, + } + } +} |