feat: jan de 6 tables : check dice roll count
This commit is contained in:
parent
17605efe76
commit
3d41517909
5 changed files with 102 additions and 68 deletions
|
|
@ -77,13 +77,25 @@ impl Bot {
|
|||
}
|
||||
|
||||
fn calculate_points(&self) -> u8 {
|
||||
let dice_roll_count = self
|
||||
.game
|
||||
.players
|
||||
.get(&self.player_id)
|
||||
.unwrap()
|
||||
.dice_roll_count;
|
||||
let points_rules = PointsRules::new(&Color::White, &self.game.board, self.game.dice);
|
||||
points_rules.get_points().0
|
||||
points_rules.get_points(dice_roll_count).0
|
||||
}
|
||||
|
||||
fn calculate_adv_points(&self) -> u8 {
|
||||
let dice_roll_count = self
|
||||
.game
|
||||
.players
|
||||
.get(&self.player_id)
|
||||
.unwrap()
|
||||
.dice_roll_count;
|
||||
let points_rules = PointsRules::new(&Color::White, &self.game.board, self.game.dice);
|
||||
points_rules.get_points().1
|
||||
points_rules.get_points(dice_roll_count).0
|
||||
}
|
||||
|
||||
fn choose_move(&self) -> (CheckerMove, CheckerMove) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue