diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2019-08-06 10:59:30 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2019-08-06 10:59:30 +0200 |
commit | 4d8846395fe12e6d92014da10f1e017267af0c57 (patch) | |
tree | 01a054d9286b58e102974a0794bbc0dc1c8e1ac2 /src | |
parent | d23833847724620a8032bedb342d03b3b9184059 (diff) |
Extra todos for snowball moves
Diffstat (limited to 'src')
-rw-r--r-- | src/constants.rs | 9 | ||||
-rw-r--r-- | src/game.rs | 2 | ||||
-rw-r--r-- | src/strategy/mcts.rs | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/constants.rs b/src/constants.rs index 94be135..344c55b 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -178,5 +178,12 @@ pub const MOVE_SCORE: i32 = 5; pub const INVALID_COMMAND_SCORE_PENALTY: i32 = 4; pub const STARTING_BOMBS: u8 = 3; +pub const STARTING_SNOWBALLS: u8 = 3; -pub const COLLISSION_DAMAGE: i32 = 20; +pub const COLLISION_DAMAGE: i32 = 20; + +pub const LAVA_DAMAGE: i32 = 3; + +pub const LAVA_ROUND_START: u16 = 100; +pub const LAVA_ROUND_END: u16 = 350; +pub const MAX_ROUNDS: u16 = 400; diff --git a/src/game.rs b/src/game.rs index c9f9b56..5b14e46 100644 --- a/src/game.rs +++ b/src/game.rs @@ -224,7 +224,7 @@ impl GameBoard { fn simulate_moves(&mut self, actions: [Action; 2]) { match actions { [Action::Move(p1), Action::Move(p2)] if p1.x == p2.x && p1.y == p2.y => { - let damage = COLLISSION_DAMAGE; + let damage = COLLISION_DAMAGE; debug_assert_eq!( Some(false), diff --git a/src/strategy/mcts.rs b/src/strategy/mcts.rs index 26edf16..e393685 100644 --- a/src/strategy/mcts.rs +++ b/src/strategy/mcts.rs @@ -229,6 +229,8 @@ fn update(node: &mut Node, commands: [Command; 2], score: Score) { node.score_sum += score; } +// TODO: Move into game.rs +// TODO: Include snowball commands fn valid_moves(state: &GameBoard, player_index: usize) -> Vec<Command> { state .valid_shoot_commands(player_index) |