From 5dce88bcad0a1263984b71fa19ef26393d781960 Mon Sep 17 00:00:00 2001 From: Matthew Fennell Date: Thu, 16 Apr 2026 08:15:35 +0100 Subject: Initial commit --- config.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 config.scm (limited to 'config.scm') diff --git a/config.scm b/config.scm new file mode 100644 index 0000000..46d0bf2 --- /dev/null +++ b/config.scm @@ -0,0 +1,27 @@ +;;; SPDX-FileCopyrightText: 2026 Matthew Fennell +;;; +;;; SPDX-License-Identifier: AGPL-3.0-or-later + +(include "secrets.scm") +(include "util.scm") + +(define default-venues '(botwell-green-leisure-centre)) +(define default-activities '(badminton-40min badminton-60min)) +(define default-dates '(sat sun)) +(define default-checkout #t) +(define default-user matthew) + +(define (default-scorer booking) + (let ((score (lambda (cond amount) (if cond amount 0)))) + (+ + (score (rob-friendly? booking) 4) + (score (badminton-60min? booking) 2) + (score (sat? booking) 1) + (score (unreasonable-time? booking) -8) + ))) + +(define (rob-friendly? booking) + (between-hours? booking "13:00" "18:00")) + +(define (unreasonable-time? booking) + (not (between-hours? booking "10:00" "22:00"))) -- cgit v1.2.3