Skip to content

Commit 831f02c

Browse files
committed
.
1 parent 3a6f1a6 commit 831f02c

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

cargo/snk-solver/src/snake_path_to_outside.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,11 @@ _######## _
109109
Point { x: 5, y: 2 },
110110
]);
111111

112-
let (path, cost) =
113-
get_snake_path_to_outside(|p| exit_grid.is_outside(p), |p| grid.get_color(p).into(), &snake);
112+
let (path, cost) = get_snake_path_to_outside(
113+
|p| exit_grid.is_outside(p),
114+
|p| grid.get_color(p).into(),
115+
&snake,
116+
);
114117

115118
println!("{:?} {:?}", path, cost);
116119

@@ -135,7 +138,7 @@ _ _
135138
"#,
136139
);
137140

138-
assert_eq!(grid.get_color(Point { x: 5, y: 4 }),Color::Color4);
141+
assert_eq!(grid.get_color(Point { x: 5, y: 4 }), Color::Color4);
139142

140143
let exit_grid = ExitGrid::create_from_grid_color(&grid);
141144
let snake = Snake4::from_points([
@@ -147,8 +150,11 @@ _ _
147150

148151
grid.set(Point { x: 5, y: 4 }, Color::Empty);
149152

150-
let (path, cost) =
151-
get_snake_path_to_outside(|p| exit_grid.is_outside(p), |p| grid.get_color(p).into(), &snake);
153+
let (path, cost) = get_snake_path_to_outside(
154+
|p| exit_grid.is_outside(p),
155+
|p| grid.get_color(p).into(),
156+
&snake,
157+
);
152158

153159
println!("{:?} {:?}", path, cost);
154160
assert_eq!(

0 commit comments

Comments
 (0)