|
|
|
@ -134,6 +134,9 @@ class SnekGame { |
|
|
|
|
cellSize, |
|
|
|
|
cellSize |
|
|
|
|
); |
|
|
|
|
const putTileAnim=(x, y, tile) => putTile(x, y, tile[ |
|
|
|
|
Math.floor(Date.now()/1000*60+x+y)%tile.length |
|
|
|
|
]); |
|
|
|
|
const checkAdj=(x, y) => { |
|
|
|
|
let adj={}; |
|
|
|
|
adj.u=this.world[x][y-1]; |
|
|
|
@ -154,7 +157,7 @@ class SnekGame { |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case FIRE: |
|
|
|
|
putTile(x, y, fire[Math.floor(Date.now()/1000*60)%60]); |
|
|
|
|
putTileAnim(x, y, fire); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case HOLE:
|
|
|
|
|