Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor basic API to favor a declarative/data-oriented style #45

Open
facundoolano opened this issue Oct 21, 2017 · 0 comments
Open

refactor basic API to favor a declarative/data-oriented style #45

facundoolano opened this issue Oct 21, 2017 · 0 comments
Milestone

Comments

@facundoolano
Copy link
Owner

This:

(def living (-> (room/make "Living Room"
                           "A living room with a nailed shut window"
                           :initial-description "The living room was as smelly as the bedroom..."
                           :synonyms ["living" "livingroom"])
                (room/add-item drawer "There was a chest drawer by the door.")
                (room/add-item door "")
                (room/add-item glass-door "")
                (room/add-item portrait "A portrait ocuppied a very prominent place on one of the walls.")
                (room/add-item (item/make ["window"] "It was nailed shut." :closed true :open "It was nailed shut.") "")))

Should turn into this

(def living (room/make {:name                "Living Room"
                        :description         "A living room with a nailed shut window"
                        :initial-description "The living room was as smelly as the bedroom..."
                        :synonyms            ["living" "livingroom"]
                        :items               [drawer door glass-door portrait
                                              (item/make {:names       ["window"]
                                                          :description "It was nailed shut."
                                                          :closed      true
                                                          :open        "It was nailed shut."})]}
                       :item-descriptions {"drawer"   "There was a chest drawer by the door."
                                           "portrait" "A portrait ocuppied a very prominent place on one of the walls."}))
@facundoolano facundoolano added this to the v1 milestone Oct 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant