File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ export class Game {
60
60
const tile = this . map . getTile ( playerPosition . x , playerPosition . y ) ;
61
61
if ( ! tile || tile . isObstacle ) return ;
62
62
63
+ const bomb = this . getBomb ( playerPosition . x , playerPosition . y ) ;
64
+ if ( bomb ) return ;
65
+
63
66
this . player . lastMove = Date . now ( ) ;
64
67
this . player . moveTo ( playerPosition ) ;
65
68
@@ -77,8 +80,6 @@ export class Game {
77
80
const bombIndex = this . bombs . findIndex ( el => el . id === bomb . id ) ;
78
81
if ( bombIndex === - 1 ) return ; // Already exploded
79
82
80
- console . log ( 'Exploding' , bomb ) ;
81
-
82
83
this . bombs . splice ( bombIndex , 1 ) ;
83
84
if ( bomb . owner . id === this . player . id ) this . player . bombsPlaced -- ;
84
85
@@ -106,7 +107,6 @@ export class Game {
106
107
}
107
108
108
109
for ( const bomb of bombsToChain ) {
109
- console . log ( 'Chaining bomb' , bomb ) ;
110
110
this . explode ( bomb ) ;
111
111
}
112
112
}
You can’t perform that action at this time.
0 commit comments