This repository was archived by the owner on Jul 10, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,9 @@ let y2: number;
78
78
let flr2 : Lvl ;
79
79
let sx1 : number ;
80
80
let sy1 : number ;
81
+ let px = 1 ;
82
+ let py = 1 ;
83
+ let old : number ;
81
84
82
85
library . add (
83
86
faXmark ,
@@ -405,15 +408,15 @@ function pathCalculationInternals(
405
408
406
409
Object . values ( stairs ) . forEach (
407
410
( [ first , second ] : Coords2D , index : number ) : void => {
408
- const distance =
409
- Math . abs ( x1 - first ) +
410
- Math . abs ( y1 - second ) +
411
- Math . abs ( x2 - first ) +
412
- Math . abs ( y2 - second ) ;
413
-
414
- if ( distance < minData . min ) {
415
- minData = { min : distance , minIndex : index } ;
416
- }
411
+ const distance =
412
+ Math . abs ( x1 - first ) +
413
+ Math . abs ( y1 - second ) +
414
+ Math . abs ( x2 - first ) +
415
+ Math . abs ( y2 - second ) ;
416
+
417
+ if ( distance < minData . min ) {
418
+ minData = { min : distance , minIndex : index } ;
419
+ }
417
420
} ,
418
421
) ;
419
422
@@ -650,10 +653,6 @@ async function startApp(): Promise<void> {
650
653
}
651
654
window . startApp = startApp ;
652
655
653
- let px = 1 ;
654
- let py = 1 ;
655
- let old : number ;
656
-
657
656
function onKeyDown ( event : KeyboardEvent ) : void {
658
657
switch ( viewLvl ) {
659
658
case 1 : {
You can’t perform that action at this time.
0 commit comments