summaryrefslogtreecommitdiff
path: root/util.scm
diff options
context:
space:
mode:
authorMatthew Fennell <matthew@fennell.dev>2026-05-14 17:07:24 +0100
committerMatthew Fennell <matthew@fennell.dev>2026-05-14 17:07:24 +0100
commit9ef2768939305ee9eb933514034fd527100aa7a6 (patch)
tree7147e2a317346563650e97656fbabc28cbe833d2 /util.scm
parent9c2d127368a3cf3ed7f1d1fd6f1bd77dd08d81c5 (diff)
Score fake booking as 0
This allows the prevention of bookings fulfilling certain conditions from being booked, if they have a negative score. This can be useful if, for instance, I want to prevent any bookings on a given day. -inf always compared as less than another proposed score, meaning that it would be possible for a negative-scoring new booking to be booked as long as there was nothing better available. This commit means that a negatively scored booking will not be booked, even if it is the only option.
Diffstat (limited to 'util.scm')
-rw-r--r--util.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.scm b/util.scm
index 6ad4333..ca58b0f 100644
--- a/util.scm
+++ b/util.scm
@@ -64,7 +64,7 @@
(define fake-score
(let* ((fake-date (make-date 0 0 0 0 0 0 0 0))
(fake-booking (make-booking 'fake-venue 'fake-activity fake-date fake-date)))
- `(,fake-booking ,(-(inf)))))
+ `(,fake-booking 0)))
;;; Dates