Neo-Poseidon/game/carrier.rs

29 lines
503 B
Rust
Raw Permalink Normal View History

2019-05-09 00:13:15 +02:00
#[derive(Debug)]
2019-05-08 01:36:04 +02:00
enum Order {
2019-05-08 01:42:58 +02:00
NOTHING,
GARRISON(u16),
DROP_ALL,
DROP(u16),
DROP_ALL_BUT(u16),
COLLECT_ALL,
COLLECT(u16),
COLLECT_ALL_BUT(u16),
LOOP
2019-05-08 01:36:04 +02:00
}
2019-05-09 00:13:15 +02:00
impl Default for Order {
fn default() -> Self {
Order::NOTHING
}
}
2019-05-08 01:36:04 +02:00
2019-05-09 00:13:15 +02:00
#[derive(Default,Debug)]
2019-05-08 01:36:04 +02:00
pub struct Carrier {
2019-05-09 00:13:15 +02:00
ownerID: u8,
2019-05-08 01:36:04 +02:00
name: String,
ships: u16,
location: (u16, u16),
2019-05-09 00:13:15 +02:00
orders: Vec<(u8, Order)>,
completedOrders: Vec<(u8, Order)>,
order_pointer: u8,
repeat: bool
2019-05-08 01:36:04 +02:00
}