LordXido commited on
Commit
6510ff3
·
verified ·
1 Parent(s): 384cd62

Create src/state.rs

Browse files
Files changed (1) hide show
  1. src/state.rs +28 -0
src/state.rs ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ use serde::{Serialize, Deserialize};
2
+
3
+ #[derive(Debug, Clone, Serialize, Deserialize)]
4
+ pub struct VMState {
5
+ pub trust: i64,
6
+ pub flow_total: i64,
7
+ pub flow_velocity: f64,
8
+ pub productivity: i64,
9
+ pub credit_balance: i64,
10
+ pub credit_cap: i64,
11
+ pub default_risk: f64,
12
+ pub identity_locked: bool,
13
+ }
14
+
15
+ impl VMState {
16
+ pub fn new() -> Self {
17
+ Self {
18
+ trust: 100,
19
+ flow_total: 0,
20
+ flow_velocity: 0.0,
21
+ productivity: 0,
22
+ credit_balance: 0,
23
+ credit_cap: 0,
24
+ default_risk: 0.0,
25
+ identity_locked: false,
26
+ }
27
+ }
28
+ }