2019-01-23 21:04:52 +01:00
|
|
|
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,
|
2019-01-24 01:43:57 +01:00
|
|
|
location: &Star
|
|
|
|
action_queue: VecDeque<(&Star, Action)>,
|
|
|
|
past_actions: VecDeque<(&Star, Action)>,
|
2019-01-23 21:04:52 +01:00
|
|
|
owner: &player
|
|
|
|
}
|