Remove edge search

This commit is contained in:
Mashy 2018-12-30 15:22:21 +10:00
parent d041bcd9bb
commit 3f208bb29c

View File

@ -87,11 +87,8 @@ class Zones extends Phaser.Scene {
drawEdges(edgeData) {
this.graphics.clear();
edgeData.forEach((e) => {
const drawEdge = this.nodes.filter(n => (
e[0] === n.id || e[1] === n.id
));
const nodeA = this.nodes[drawEdge[0].id];
const nodeB = this.nodes[drawEdge[1].id];
const nodeA = this.nodes[e[0]];
const nodeB = this.nodes[e[1]];
if (nodeA.success && nodeB.success) {
this.graphics.lineStyle(10, 0xfff00f, 0.2);
} else {