@opndev/tennis-match-center 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Changes CHANGED
@@ -1,5 +1,14 @@
1
1
  Revision history for @opndev/tennis-match-center
2
2
 
3
+ 0.0.5 2026-10-12 14:29:04Z
4
+
5
+ * After dark a knockout round takes the lowest lit courts. Courts shut
6
+ for the dark counted as busy, which drew the round up the row to sit
7
+ beside them.
8
+
9
+ * A round is never cut into uneven quarters or eighths. Ten matches
10
+ halve 5/5 and no longer go 3/3/3/1.
11
+
3
12
  0.0.4 2026-10-10 14:39:58Z
4
13
 
5
14
  * Auto-fill only adds. The Planning board hands the planner the cells
package/lib/index.mjs CHANGED
@@ -2,6 +2,6 @@
2
2
  //
3
3
  // SPDX-License-Identifier: AGPL-3.0-or-later
4
4
 
5
- const VERSION = "0.0.4";export { VERSION }
5
+ const VERSION = "0.0.5";export { VERSION }
6
6
  export { autoFillBracket } from './bracket-autofill.mjs'
7
7
 
@@ -161,6 +161,10 @@ export class KnockoutDraw {
161
161
  continue
162
162
  }
163
163
 
164
+ if (parts > 2 && this.width % parts !== 0) {
165
+ continue
166
+ }
167
+
164
168
  if (parts > 2 && count < MIN_ROUND_PART) {
165
169
  continue
166
170
  }
@@ -66,7 +66,11 @@ function holdCourts(item, pool, day, where, row) {
66
66
  }
67
67
 
68
68
  const at = court => row.indexOf(court)
69
- const busy = new Set(row.filter(court => !pool.includes(court)).map(at))
69
+ const slot = where.slots[where.slotIndex]
70
+ const usable = new Set(day.usable(row, slot))
71
+ const busy = new Set(
72
+ row.filter(court => usable.has(court) && !pool.includes(court)).map(at)
73
+ )
70
74
  // Where the draw played its last round: one that has to move moves
71
75
  // as little as it can.
72
76
  const were = (item.draw.lastCourts ?? []).map(id => row.findIndex(c => c.id === id))
package/package.json CHANGED
@@ -40,5 +40,5 @@
40
40
  },
41
41
  "sideEffects": true,
42
42
  "type": "module",
43
- "version": "0.0.4"
43
+ "version": "0.0.5"
44
44
  }