diff options
| author | Matthew Fennell <matthew@fennell.dev> | 2026-05-14 17:07:24 +0100 |
|---|---|---|
| committer | Matthew Fennell <matthew@fennell.dev> | 2026-05-14 17:07:24 +0100 |
| commit | 9ef2768939305ee9eb933514034fd527100aa7a6 (patch) | |
| tree | 7147e2a317346563650e97656fbabc28cbe833d2 /util.scm | |
| parent | 9c2d127368a3cf3ed7f1d1fd6f1bd77dd08d81c5 (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.scm | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |
