File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -234,8 +234,8 @@ public TilePosition breadthFirstSearch(
234234
235235 final Set <TilePosition > visited =
236236 new TreeSet <>(
237- Comparator .comparing (TilePosition :: getX )
238- .thenComparing (TilePosition :: getY ));
237+ Comparator .comparing (( TilePosition tilePosition ) -> tilePosition . x )
238+ .thenComparing (( TilePosition tilePosition ) -> tilePosition . y ));
239239 Queue <TilePosition > toVisit = new ArrayDeque <>();
240240
241241 toVisit .add (start );
@@ -293,8 +293,8 @@ public WalkPosition breadthFirstSearch(
293293
294294 final Set <WalkPosition > visited =
295295 new TreeSet <>(
296- Comparator .comparing (WalkPosition :: getX )
297- .thenComparing (WalkPosition :: getY ));
296+ Comparator .comparing (( WalkPosition pos ) -> pos . x )
297+ .thenComparing (( WalkPosition pos ) -> pos . y ));
298298 final Queue <WalkPosition > toVisit = new ArrayDeque <>();
299299
300300 toVisit .add (start );
You can’t perform that action at this time.
0 commit comments