This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-22
Channels
- # adventofcode (78)
- # announcements (12)
- # babashka (2)
- # beginners (116)
- # calva (20)
- # cider (17)
- # clj-kondo (15)
- # cljs-dev (51)
- # clojure (32)
- # clojure-android (1)
- # clojure-dev (4)
- # clojure-europe (91)
- # clojure-gamedev (1)
- # clojure-italy (2)
- # clojure-nl (1)
- # clojure-spec (12)
- # clojure-taiwan (1)
- # clojure-uk (10)
- # clojurescript (9)
- # conjure (3)
- # cryogen (4)
- # cursive (4)
- # data-science (1)
- # datomic (5)
- # depstar (5)
- # fulcro (39)
- # google-cloud (2)
- # kaocha (2)
- # malli (7)
- # off-topic (3)
- # pathom (3)
- # pedestal (5)
- # re-frame (19)
- # rewrite-clj (54)
- # ring (3)
- # shadow-cljs (12)
- # spacemacs (12)
- # specter (3)
- # tools-deps (63)
I was convinced that I was at my disadvantage, reading a very long text while having ADHD, but it turned out that I was not slower than others.
On this one, I miss a detail which costs me at least 20 minutes. 😄
The funniest part of today’s puzzle is that the crab won the card game. Twice.
... based on the sample data.
I’m actually a bit stumped.. I track seen states, verified that on the test loop game, fixed the bug with taking n
cards in the subgames, works on sample, hangs forever on actual input
Only other thing I can think of is that the confusion around or
for seeing prior games. I interpreted that line as you need to see the entire game state (both decks) again
maybe post your current code? or try someone else's solution on your input data? to double check you haven't been given something broken
so bizarre.. so after changing to the interpretation of “seeing” a game as meaning either deck, it terminates… with the wrong answer. I’ll post what I’ve got, apologies for the mess as I’ve hacked it apart trying to fix it and it’s now pretty messy
@markw ran my solution with your input, got 36463 with a strict condition
probably something obvious that i’m just not getting, but it doesn’t help that the test input works perfectly, line-by line
I guess this condition in a wrong place (if (= winner :player1)
, the game should instantly end if there was a previous round in this game that had exactly the same cards.
the test input doesn’t trigger that condition, that’s why it works.