Fix resource sending

This commit is contained in:
Anton Vakhrushev 2020-05-28 20:57:48 +03:00
parent 86fb5c529b
commit 5f5cd20c37

View File

@ -23,9 +23,11 @@ export class FindSendResourcesPath extends ActionController {
const villages = this.villageFactory.getAllVillages();
for (let fromVillage of villages) {
for (let toVillage of villages) {
if (fromVillage.id !== toVillage.id) {
reports.push(calculator.calc(fromVillage.id, toVillage.id));
}
}
}
reports.sort((r1, r2) => r2.score - r1.score);