From 51d10290d2419be294f367edd43f795d54a1d0ae Mon Sep 17 00:00:00 2001 From: phyzical Date: Sat, 12 Feb 2022 00:13:56 +0800 Subject: [PATCH] added early out for redundant assignment --- src/Corporation/OfficeSpace.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Corporation/OfficeSpace.ts b/src/Corporation/OfficeSpace.ts index 9bd3020f1..dd90304d6 100644 --- a/src/Corporation/OfficeSpace.ts +++ b/src/Corporation/OfficeSpace.ts @@ -184,6 +184,7 @@ export class OfficeSpace { } } + if (jobCount == amount) return false; if ((jobCount + unassignedCount) < amount) return false; for (let i = 0; i < this.employees.length; ++i) {