summaryrefslogtreecommitdiff
path: root/2018-tower-defence/src/strategy/static_opening.rs
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2022-04-19 21:29:11 +0200
committerJustin Wernick <justin@worthe-it.co.za>2022-04-19 21:29:11 +0200
commit01a849c6b26afd076989f645c6153d8ce1422281 (patch)
treea02fbbfbd958b8492dd3dc7bd58b4bb1d8566080 /2018-tower-defence/src/strategy/static_opening.rs
parent59f8b6a8ef1abfd0556cc940ccb64305fcdf2968 (diff)
parent7ec48d0d454499177b63bc5bd512a3a2d6baa839 (diff)
Merge branch 'tower-defence-main'
Diffstat (limited to '2018-tower-defence/src/strategy/static_opening.rs')
-rw-r--r--2018-tower-defence/src/strategy/static_opening.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/2018-tower-defence/src/strategy/static_opening.rs b/2018-tower-defence/src/strategy/static_opening.rs
new file mode 100644
index 0000000..f7e101c
--- /dev/null
+++ b/2018-tower-defence/src/strategy/static_opening.rs
@@ -0,0 +1,21 @@
+use engine::geometry::*;
+use engine::command::*;
+use engine::bitwise_engine::*;
+
+pub const STATIC_OPENING_LENGTH: u16 = 12;
+
+pub fn choose_move(state: &BitwiseGameState) -> Command {
+ match state.round {
+ 0 => Command::Build(Point::new(0,0), BuildingType::Energy),
+ 3 => Command::Build(Point::new(0,1), BuildingType::Energy),
+ 5 => Command::Build(Point::new(0,2), BuildingType::Energy),
+ 7 => Command::Build(Point::new(0,3), BuildingType::Energy),
+ 9 => Command::Build(Point::new(0,4), BuildingType::Energy),
+ 10 => Command::Build(Point::new(0,5), BuildingType::Energy),
+ 11 => Command::Build(Point::new(0,6), BuildingType::Energy),
+ 12 => Command::Build(Point::new(0,7), BuildingType::Energy),
+ 13 => Command::Build(Point::new(1,0), BuildingType::Energy),
+ 14 => Command::Build(Point::new(1,7), BuildingType::Energy),
+ _ => Command::Nothing
+ }
+}