File tree Expand file tree Collapse file tree 3 files changed +9
-411
lines changed Expand file tree Collapse file tree 3 files changed +9
-411
lines changed Original file line number Diff line number Diff line change 11import Subtype from "./subtype" ;
22import NeighborhoodCell from "./neighborhoodCell" ;
3- import NeighborhoodSquareDrawer from "./neighborhoodSquareDrawer" ;
4- import NeighborhoodCircleDrawer from "./neighborhoodCircleDrawer" ;
3+ import NeighborhoodDrawer from "./neighborhoodDrawer" ;
54import { Direction } from "./tiles" ;
65
76module . exports = class Neighborhood extends Subtype {
@@ -76,24 +75,14 @@ module.exports = class Neighborhood extends Subtype {
7675 /**
7776 * @override
7877 **/
79- createDrawer ( svg , drawer = "square" ) {
80- if ( drawer === "square" ) {
81- this . drawer = new NeighborhoodSquareDrawer (
82- this . maze_ . map ,
83- this . skin_ ,
84- svg ,
85- this . squareSize ,
86- this
87- ) ;
88- } else {
89- this . drawer = new NeighborhoodCircleDrawer (
90- this . maze_ . map ,
91- this . skin_ ,
92- svg ,
93- this . squareSize ,
94- this
95- ) ;
96- }
78+ createDrawer ( svg ) {
79+ this . drawer = new NeighborhoodDrawer (
80+ this . maze_ . map ,
81+ this . skin_ ,
82+ svg ,
83+ this . squareSize ,
84+ this
85+ ) ;
9786 }
9887
9988 /**
You can’t perform that action at this time.
0 commit comments