From b88d4300b2bf19ef11d6275bec9c08fe68b2cadc Mon Sep 17 00:00:00 2001 From: Maros Hluska Date: Thu, 23 Jun 2016 22:32:14 -0400 Subject: [PATCH] Fix bug: tile occupied after changing face --- source/snake.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/snake.js b/source/snake.js index 5cd2bb8..5b9591f 100644 --- a/source/snake.js +++ b/source/snake.js @@ -213,6 +213,9 @@ module.exports = class Snake { _removeEdgeMesh() { this.mesh.remove(this.tail); this.size -= 1; + + // NOTE(maros): This is the new tail after updating `this.size`. + this.world.enable(this.tail.position.toArray()); } _getTailFace() {