File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -209,19 +209,12 @@ module.exports = class NeighborhoodDrawer extends Drawer {
209209 * @param col
210210 */
211211 resetTile ( row , col ) {
212- let neighbors = [
213- "g" + row + "." + col ,
214- "g" + ( row - 1 ) + "." + ( col - 1 ) ,
215- "g" + row + "." + ( col - 1 ) ,
216- "g" + ( row - 1 ) + "." + col ,
217- ] ;
212+ let subjectTile = "g" + row + "." + col ;
218213 const cell = this . neighborhood . getCell ( row , col ) ;
219214 cell . setColor ( null ) ;
220- for ( const neighbor of neighbors ) {
221- var node = document . getElementById ( neighbor ) ;
222- if ( node ) {
223- node . querySelectorAll ( "*" ) . forEach ( ( n ) => n . remove ( ) ) ;
224- }
215+ var node = document . getElementById ( subjectTile ) ;
216+ if ( node ) {
217+ node . querySelectorAll ( "*" ) . forEach ( ( n ) => n . remove ( ) ) ;
225218 }
226219 }
227220
You can’t perform that action at this time.
0 commit comments