fix: formatting again

This commit is contained in:
2026-09-05 15:53:11 +02:00
parent f580adf743
commit f6f1957231
3 changed files with 41 additions and 40 deletions

View File

@@ -72,7 +72,6 @@ struct ClientContext {
pub available_moves: Option<Vec<MovePath>>, pub available_moves: Option<Vec<MovePath>>,
} }
async fn run_bot() { async fn run_bot() {
let bot = Bot::new(BotDificulty::Easy).await; let bot = Bot::new(BotDificulty::Easy).await;
bot.game_loop().await; bot.game_loop().await;
@@ -96,8 +95,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
loop { loop {
let mut buffer = String::new(); let mut buffer = String::new();
if stdin.read_line(&mut buffer).is_ok() if stdin.read_line(&mut buffer).is_ok() && stdin_sender.blocking_send(buffer).is_err() {
&& stdin_sender.blocking_send(buffer).is_err() {
break; break;
} }
} }

View File

@@ -280,7 +280,8 @@ impl Board {
if let Some(target) = target_option if let Some(target) = target_option
&& self.can_capture(current_pos, target, player, captured_enemies, pawn) && self.can_capture(current_pos, target, player, captured_enemies, pawn)
&& let Some(path_after_capture) = target.checked_add(direction) { && let Some(path_after_capture) = target.checked_add(direction)
{
debug!( debug!(
"Found possible capture: {} -> {}", "Found possible capture: {} -> {}",
current_pos, path_after_capture current_pos, path_after_capture

View File

@@ -190,7 +190,8 @@ impl Board {
&& available_moves.iter().any(|available_move| { && available_moves.iter().any(|available_move| {
available_move.from == from available_move.from == from
&& available_move.available_steps.contains(&field.pos) && available_move.available_steps.contains(&field.pos)
}) { })
{
self.choosen_move = Some(MovePath { self.choosen_move = Some(MovePath {
from, from,
available_steps: vec![field.pos], available_steps: vec![field.pos],
@@ -235,7 +236,8 @@ impl Board {
} else { } else {
false false
} }
}) { })
{
self.current_capture_path.push(*clicked_field); self.current_capture_path.push(*clicked_field);
self.current_deepness += 1; self.current_deepness += 1;
} }