From 5f5cd20c375aa4aac51fd614fbfc5c104eadb48d Mon Sep 17 00:00:00 2001 From: Anton Vakhrushev Date: Thu, 28 May 2020 20:57:48 +0300 Subject: [PATCH] Fix resource sending --- src/Action/FindSendResourcesPath.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Action/FindSendResourcesPath.ts b/src/Action/FindSendResourcesPath.ts index f0f895a..1722ff6 100644 --- a/src/Action/FindSendResourcesPath.ts +++ b/src/Action/FindSendResourcesPath.ts @@ -23,7 +23,9 @@ export class FindSendResourcesPath extends ActionController { const villages = this.villageFactory.getAllVillages(); for (let fromVillage of villages) { for (let toVillage of villages) { - reports.push(calculator.calc(fromVillage.id, toVillage.id)); + if (fromVillage.id !== toVillage.id) { + reports.push(calculator.calc(fromVillage.id, toVillage.id)); + } } }