diff --git a/rust/cli_player/src/ui_screens/set_boats_layout.rs b/rust/cli_player/src/ui_screens/set_boats_layout.rs index efdd8e3..0af6f41 100644 --- a/rust/cli_player/src/ui_screens/set_boats_layout.rs +++ b/rust/cli_player/src/ui_screens/set_boats_layout.rs @@ -66,17 +66,11 @@ pub fn set_boat_layout( // Start mouse action if MouseEventKind::Down(MouseButton::Left) == mouse.kind { is_moving_boat = if let Some(pos) = coordinates_mapper.get(&src_pos) { - match model.layout.find_boat_at_position(*pos).cloned() { - // Change of selected boat - Some(b) if b != model.layout.0[model.curr_boat] => { - model.curr_boat = - model.layout.0.iter().position(|s| s == &b).unwrap(); - false - } - - // Move current boat - _ => true, + if let Some(b) = model.layout.find_boat_at_position(*pos) { + model.curr_boat = model.layout.0.iter().position(|s| s == b).unwrap(); } + + true } else { false }