Neo-Poseidon/game/carrier.rs

29 lines
503 B
Rust

#[derive(Debug)]
enum Order {
NOTHING,
GARRISON(u16),
DROP_ALL,
DROP(u16),
DROP_ALL_BUT(u16),
COLLECT_ALL,
COLLECT(u16),
COLLECT_ALL_BUT(u16),
LOOP
}
impl Default for Order {
fn default() -> Self {
Order::NOTHING
}
}
#[derive(Default,Debug)]
pub struct Carrier {
ownerID: u8,
name: String,
ships: u16,
location: (u16, u16),
orders: Vec<(u8, Order)>,
completedOrders: Vec<(u8, Order)>,
order_pointer: u8,
repeat: bool
}