<commit_before>(ns house.rooms.back
  (:require [advenjure.rooms :as room]
            [advenjure.items :as item]
            [advenjure.utils :as utils]
            [house.puzzles.bath-window :refer [piano-stool]]
            [house.puzzles.catalog :refer [catalog]]
            [house.puzzles.safe :refer [safe-portrait]]
            [house.puzzles.oak-door :refer [oak-door-back]]
            [house.puzzles.gate-door :refer [key-set]]
            [house.puzzles.candles :refer [candles candlestick]]))

; common corridor items
(def corridor (item/make ["corridor" "passage" "passageway" "hall" "hallway"]
                         "The corridor had a high roof and a squeaky wooden floor, covered by a rug. There were some paintings between the doors."))

(def paintings (item/make ["paintings" "painting" "portraits" "portraits"]
                          "I didn't know much about arts, but those looked expensive."
                          :take "They were good on the wall."))

(def floor (item/make "floor" "Old, wooden, noisy. Very much like the rest of the house."))

(def rug (item/make "rug" "An ornate long rug."))

(defn make-door [extra-name goes-to]
   (item/make ["door" extra-name]
      "A wooden door."
      :closed true
      :enter goes-to))

(def back-hall3 (->
                  (room/make "Corridor"
                             "The end of a corridor with rooms to the east and west, and the door to the back garden"
                             :initial-description "My steps resounded throughout a long corridor, with a series of rooms on each side. On the other end was an oak door, ajar.")
                  (room/add-item (make-door "west door" :bedroom2) "")
                  (room/add-item (make-door "east door" :bedroom3) "")
                  (room/add-item corridor "")
                  (room/add-item paintings "")
                  (room/add-item floor "")
                  (room/add-item rug "")))

(def fake-door (item/make ["door" "west door"]
                          "It was the same as the other doors in the corridor, except it didn't have a doorknob."
                          :open "I couldn't open the west door, it didn't have a doorknob."))

(def back-hall2 (->
                  (room/make "Corridor"
                             "The middle section of a corridor. There were doors to the east and west, but the latter didn't have a doorknob."
                             :initial-description "The rug that traversed the room wasn't enough to silence the creak of the floor, as if the house denounced my irruption."
                             :known true)
                  (room/add-item fake-door "")
                  (room/add-item (make-door "east door" :tapestry) "")
                  (room/add-item corridor "")
                  (room/add-item paintings "")
                  (room/add-item floor "")
                  (room/add-item rug "")))

(def back-hall1 (->
                  (room/make "Corridor"
                             "The massive oak door was blocking my way to the front section of the house. There were rooms to the east and west."
                             :initial-description "The massive oak door separated the corridor from the front section of the house; it was slightly ajar. As I reached for the knob, the door was suddenly pulled back and slammed shut; sounds of a key and a bolt followed immediately.\n \nThey heard me coming and they locked me out."
                             :known true)
                  (room/add-item corridor "")
                  (room/add-item paintings "")
                  (room/add-item floor "")
                  (room/add-item rug "")
                  (room/add-item (make-door "west door" :library) "")
                  (room/add-item (make-door "east door" :dining) "")
                  (room/add-item oak-door-back "")))

(def top-drawer (item/make ["drawer" "top drawer"]
                           "There was nothing special about it."
                           :open "Tablecloths, placemats and napkins."
                           :look-in "Tablecloths, placemats and napkins."))

(defn post-open
  [old gs]
  (let [drawer (utils/find-first gs "bottom drawer")
        new-drawer (update-in drawer [:open] dissoc :say)]
    (utils/replace-item gs drawer new-drawer)))

(def bottom-drawer (item/make ["drawer" "bottom drawer"]
                              "There was nothing special about it."
                              :closed true
                              :open {:pre true
                                     :say "A lot of silverware; utensils I didn’t knew existed. Also a box of candles."
                                     :post `post-open}
                              :items #{candles}))

(def dining (->
              (room/make "Dining room"
                         "A dining room with a table big enough to fit twenty people. There were ornate chairs all around it and a smaller table on the side. By the wall was a dinnerware cabinet with two drawers.")
              (room/add-item (item/make ["cabinet" "dinnerware cabinet"] "It had three shelves full of dinnerware and two drawers." :open "You mean a drawer?") "")
              (room/add-item top-drawer "")
              (room/add-item bottom-drawer "")
              (room/add-item (item/make ["dining table" "table"] "I lived in places smaller than that table.") "")
              (room/add-item (item/make ["table" "small table"] "I guessed it was used to hold dishes during dinner.") "")<commit_msg>w and e shortcuts for passage doors<commit_after>(ns house.rooms.back
  (:require [advenjure.rooms :as room]
            [advenjure.items :as item]
            [advenjure.utils :as utils]
            [house.puzzles.bath-window :refer [piano-stool]]
            [house.puzzles.catalog :refer [catalog]]
            [house.puzzles.safe :refer [safe-portrait]]
            [house.puzzles.oak-door :refer [oak-door-back]]
            [house.puzzles.gate-door :refer [key-set]]
            [house.puzzles.candles :refer [candles candlestick]]))

; common corridor items
(def corridor (item/make ["corridor" "passage" "passageway" "hall" "hallway"]
                         "The corridor had a high roof and a squeaky wooden floor, covered by a rug. There were some paintings between the doors."))

(def paintings (item/make ["paintings" "painting" "portraits" "portraits"]
                          "I didn't know much about arts, but those looked expensive."
                          :take "They were good on the wall."))

(def floor (item/make "floor" "Old, wooden, noisy. Very much like the rest of the house."))

(def rug (item/make "rug" "An ornate long rug."))

(defn make-door [extra-names goes-to]
   (item/make (apply conj ["door"] extra-names)
      "A wooden door."
      :closed true
      :enter goes-to))

(def back-hall3 (->
                  (room/make "Corridor"
                             "The end of a corridor with rooms to the east and west, and the door to the back garden"
                             :initial-description "My steps resounded throughout a long corridor, with a series of rooms on each side. On the other end was an oak door, ajar.")
                  (room/add-item (make-door ["west door" "w door"] :bedroom2) "")
                  (room/add-item (make-door ["east door" "e door"] :bedroom3) "")
                  (room/add-item corridor "")
                  (room/add-item paintings "")
                  (room/add-item floor "")
                  (room/add-item rug "")))

(def fake-door (item/make ["door" "west door" "w door"]
                          "It was the same as the other doors in the corridor, except it didn't have a doorknob."
                          :open "I couldn't open the west door, it didn't have a doorknob."))

(def back-hall2 (->
                  (room/make "Corridor"
                             "The middle section of a corridor. There were doors to the east and west, but the latter didn't have a doorknob."
                             :initial-description "The rug that traversed the room wasn't enough to silence the creak of the floor, as if the house denounced my irruption."
                             :known true)
                  (room/add-item fake-door "")
                  (room/add-item (make-door ["east door" "e door"] :tapestry) "")
                  (room/add-item corridor "")
                  (room/add-item paintings "")
                  (room/add-item floor "")
                  (room/add-item rug "")))

(def back-hall1 (->
                  (room/make "Corridor"
                             "The massive oak door was blocking my way to the front section of the house. There were rooms to the east and west."
                             :initial-description "The massive oak door separated the corridor from the front section of the house; it was slightly ajar. As I reached for the knob, the door was suddenly pulled back and slammed shut; sounds of a key and a bolt followed immediately.\n \nThey heard me coming and they locked me out."
                             :known true)
                  (room/add-item corridor "")
                  (room/add-item paintings "")
                  (room/add-item floor "")
                  (room/add-item rug "")
                  (room/add-item (make-door ["west door" "w door"] :library) "")
                  (room/add-item (make-door ["east door" "e door"] :dining) "")
                  (room/add-item oak-door-back "")))

(def top-drawer (item/make ["drawer" "top drawer"]
                           "There was nothing special about it."
                           :open "Tablecloths, placemats and napkins."
                           :look-in "Tablecloths, placemats and napkins."))

(defn post-open
  [old gs]
  (let [drawer (utils/find-first gs "bottom drawer")
        new-drawer (update-in drawer [:open] dissoc :say)]
    (utils/replace-item gs drawer new-drawer)))

(def bottom-drawer (item/make ["drawer" "bottom drawer"]
                              "There was nothing special about it."
                              :closed true
                              :open {:pre true
                                     :say "A lot of silverware; utensils I didn’t knew existed. Also a box of candles."
                                     :post `post-open}
                              :items #{candles}))

(def dining (->
              (room/make "Dining room"
                         "A dining room with a table big enough to fit twenty people. There were ornate chairs all around it and a smaller table on the side. By the wall was a dinnerware cabinet with two drawers.")
              (room/add-item (item/make ["cabinet" "dinnerware cabinet"] "It had three shelves full of dinnerware and two drawers." :open "You mean a drawer?") "")
              (room/add-item top-drawer "")
              (room/add-item bottom-drawer "")
              (room/add-item (item/make ["dining table" "table"] "I lived in places smaller than that table.") "")
              (room/add-item (item/make ["table" "small table"] "I guessed it was used to hold dishes during dinner.") "")
{'fraction_non_alphanumeric': 0.10710128055878929, 'fraction_numerical': 0.0008954956568460643, 'mean_word_length': 1.7232382345769324, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2728543', 'n_tokens_mistral': 3040, 'n_tokens_neox': 2942, 'n_words': 1146}