forgot cadr exists!!

This commit is contained in:
cow 2022-12-06 02:57:58 -05:00
parent ac63b977ba
commit fe29d4dd32

View file

@ -92,8 +92,8 @@
(string-split s " " t))
input)))
(seq-reduce (lambda (acc row)
(let* ((their-shape (cdr (assoc (nth 0 row) solution-opponent-letter-to-shape-alist)))
(our-shape (cdr (assoc (nth 1 row) solution-player-letter-to-shape-alist)))
(let* ((their-shape (cdr (assoc (car row) solution-opponent-letter-to-shape-alist)))
(our-shape (cdr (assoc (cadr row) solution-player-letter-to-shape-alist)))
(outcome (solution-decide-game our-shape their-shape)))
(+ acc
(cdr (assoc our-shape solution-shape-score-alist))
@ -106,8 +106,8 @@
(string-split s " " t))
input)))
(seq-reduce (lambda (acc row)
(let* ((their-shape (cdr (assoc (nth 0 row) solution-opponent-letter-to-shape-alist)))
(desired-outcome (cdr (assoc (nth 1 row) solution-player-letter-to-outcome-alist)))
(let* ((their-shape (cdr (assoc (car row) solution-opponent-letter-to-shape-alist)))
(desired-outcome (cdr (assoc (cadr row) solution-player-letter-to-outcome-alist)))
(our-shape (solution-shape-for-outcome their-shape desired-outcome)))
(+ acc
(cdr (assoc our-shape solution-shape-score-alist))