@@ -25,7 +25,7 @@ public static class IMapGridExtension
2525 var currentX = ( short ) ( cell . X + delta . X ) ;
2626 var currentY = ( short ) ( cell . Y + delta . Y ) ;
2727 return currentX >= 0 && currentX < grid . Width &&
28- currentY >= 0 && currentY < grid . Length &&
28+ currentY >= 0 && currentY < grid . Height &&
2929 ( includeWalls || grid . IsWalkable ( currentX , currentY )
3030 ) ;
3131 } ) . Select ( delta => ( ( short ) ( cell . X + delta . X ) , ( short ) ( cell . Y + delta . Y ) ) ) ;
@@ -34,14 +34,14 @@ public static class IMapGridExtension
3434 public static BrushFire LoadBrushFire ( this IMapGrid mapGrid , ( short X , short Y ) user , IHeuristic heuristic , short maxDistance = 22 )
3535 {
3636 if ( user . X < 0 || user . X >= mapGrid . Width ||
37- user . Y < 0 || user . Y >= mapGrid . Length )
37+ user . Y < 0 || user . Y >= mapGrid . Height )
3838 {
39- return new BrushFire ( user , new Dictionary < ( short X , short Y ) , Node ? > ( ) , mapGrid . Width , mapGrid . Length ) ;
39+ return new BrushFire ( user , new Dictionary < ( short X , short Y ) , Node ? > ( ) , mapGrid . Width , mapGrid . Height ) ;
4040 }
4141
4242 var path = new MinHeap ( ) ;
4343 var cellGrid = new Dictionary < ( short X , short Y ) , Node ? > ( ) ;
44- var grid = new Node ? [ mapGrid . Width , mapGrid . Length ] ;
44+ var grid = new Node ? [ mapGrid . Width , mapGrid . Height ] ;
4545 grid [ user . X , user . Y ] = new Node ( user , mapGrid [ user . X , user . Y ] )
4646 {
4747 Closed = true
@@ -82,7 +82,7 @@ public static BrushFire LoadBrushFire(this IMapGrid mapGrid, (short X, short Y)
8282 neighbors [ i ] ! . Closed = true ;
8383 }
8484 }
85- return new BrushFire ( user , cellGrid , mapGrid . Width , mapGrid . Length ) ;
85+ return new BrushFire ( user , cellGrid , mapGrid . Width , mapGrid . Height ) ;
8686 }
8787
8888 }
0 commit comments