diff --git a/Carrier.rs b/Carrier.rs deleted file mode 100644 index e7c23db..0000000 --- a/Carrier.rs +++ /dev/null @@ -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 -} \ No newline at end of file diff --git a/Stars.rs b/Stars.rs deleted file mode 100644 index 626fa6f..0000000 --- a/Stars.rs +++ /dev/null @@ -1,13 +0,0 @@ -struct Star { - resources: u16, - name: String, - ships: u16, - owner: &Player, - infrastructure: Infrastructure -} - -struct Infrastructure { - Fabrication: u8, - Science: u8, - Finance: u8 -} \ No newline at end of file diff --git a/game/carrier.rs b/game/carrier.rs index b4cd340..19e00c5 100644 --- a/game/carrier.rs +++ b/game/carrier.rs @@ -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 + orders: Vec<(&Star, Order)>, + order_pointer: u8 } \ No newline at end of file diff --git a/game/star.rs b/game/star.rs index 23e54fd..834bb37 100644 --- a/game/star.rs +++ b/game/star.rs @@ -5,7 +5,7 @@ struct Infrastructre { } pub struct Star { - ownerID: Option, + owner: Option<&player>, location: (u16, u16), name: String, natural_resources: u16,