Skip to content

Commit

Permalink
correct edges
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlend committed Jul 21, 2024
1 parent b6dfd36 commit 45b4b26
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/neospy_core/src/spice/spk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,20 @@ impl SpkCollection {
pub fn try_change_center(&self, state: &mut State, new_center: i64) -> NeosResult<()> {
match (state.center_id, new_center) {
(a, b) if a == b => (),
(399, 10) | (301, 10) => {
let next = self.try_get_raw_state(3, state.jd)?;
state.try_change_center(next)?;
let next = self.try_get_raw_state(10, state.jd)?;
state.try_change_center(next)?;
(i, 0) if i <= 10 => {
state.try_change_center(self.try_get_raw_state(i, state.jd)?)?;
}
(i, 10) if i <= 8 => {
(0, 10) => {
let next = self.try_get_raw_state(10, state.jd)?;
state.try_change_center(next)?;
}
(10, 0) => {
let next = self.try_get_raw_state(10, state.jd)?;
state.try_change_center(next)?;
(i, 10) if i < 10 => {
state.try_change_center(self.try_get_raw_state(i, state.jd)?)?;
state.try_change_center(self.try_get_raw_state(10, state.jd)?)?;
}
(10, i) if i < 10 => {
state.try_change_center(self.try_get_raw_state(10, state.jd)?)?;
state.try_change_center(self.try_get_raw_state(i, state.jd)?)?;
}
_ => {
let path = self.find_path(state.center_id, new_center)?;
Expand Down

0 comments on commit 45b4b26

Please sign in to comment.