This commit is contained in:
Daniel Løvbrøtte Olsen 2019-05-08 01:42:58 +02:00
parent 164cf5886d
commit aa56a22f1b
4 changed files with 13 additions and 38 deletions

View File

@ -1,21 +0,0 @@
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,
location: &Star
action_queue: VecDeque<(&Star, Action)>,
past_actions: VecDeque<(&Star, Action)>,
owner: &player
}

View File

@ -1,13 +0,0 @@
struct Star {
resources: u16,
name: String,
ships: u16,
owner: &Player,
infrastructure: Infrastructure
}
struct Infrastructure {
Fabrication: u8,
Science: u8,
Finance: u8
}

View File

@ -1,11 +1,20 @@
enum Order {
NOTHING
NOTHING,
GARRISON(u16),
DROP_ALL,
DROP(u16),
DROP_ALL_BUT(u16),
COLLECT_ALL,
COLLECT(u16),
COLLECT_ALL_BUT(u16),
LOOP
}
pub struct Carrier {
OwnerID: u8,
owner: &Player,
name: String,
ships: u16,
location: (u16, u16),
orders: Vec<Order>
orders: Vec<(&Star, Order)>,
order_pointer: u8
}

View File

@ -5,7 +5,7 @@ struct Infrastructre {
}
pub struct Star {
ownerID: Option<u8>,
owner: Option<&player>,
location: (u16, u16),
name: String,
natural_resources: u16,