Add some types
This commit is contained in:
parent
c022cf1551
commit
d7baa63e64
|
@ -0,0 +1,20 @@
|
|||
use std::collections::VecDeque;
|
||||
|
||||
enum Action {
|
||||
NOTHING,
|
||||
GARRISON(u16),
|
||||
DROP_ALL,
|
||||
DROP(u16),
|
||||
DROP_ALL_BUT(u16),
|
||||
COLLECT_ALL,
|
||||
COLLECT(u16),
|
||||
COLLECT_ALL_BUT(u16),
|
||||
LOOP
|
||||
}
|
||||
|
||||
struct Carrier {
|
||||
ships: u16,
|
||||
action_queue: VecDeque<(&star, Action)>,
|
||||
past_actions: VecDeque<(&star, Action)>,
|
||||
owner: &player
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
enum Race {
|
||||
Griffin,
|
||||
}
|
||||
|
||||
struct Research {
|
||||
Weapons: u8,
|
||||
Banking: u8,
|
||||
Manufactoring: u8,
|
||||
Terraforming: u8,
|
||||
Hyperspace: u8,
|
||||
Experimentation: u8,
|
||||
Scanning: u8
|
||||
}
|
||||
|
||||
impl Research {
|
||||
fn getWeaponsLevel() {
|
||||
this.Weapons.
|
||||
}
|
||||
}
|
||||
|
||||
struct Player {
|
||||
Name: String,
|
||||
Color: (u8, u8, u8),
|
||||
Race: Race,
|
||||
}
|
Loading…
Reference in New Issue