From 310896cc95a88c3b00bcbc2cf5c2f58de5d81d23 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Sun, 15 Nov 2020 21:09:18 +0000 Subject: [PATCH] Prepended all namespaces with 'cc.journeyman'; tests run, 4 don't pass. --- .calva/output-window/.clj-kondo/config.edn | 1 + .gitignore | 2 ++ doc/building_on_microworld.md | 2 +- .../journeyman}/the_great_game/agent/agent.clj | 15 ++++++++------- .../the_great_game/gossip/gossip.clj | 6 +++--- .../the_great_game/gossip/news_items.clj | 6 +++--- .../the_great_game/merchants/markets.clj | 4 ++-- .../the_great_game/merchants/merchant_utils.clj | 2 +- .../the_great_game/merchants/merchants.clj | 2 +- .../the_great_game/merchants/planning.clj | 10 +++++----- .../merchants/strategies/simple.clj | 12 ++++++------ .../the_great_game/objects/container.clj | 4 ++-- .../the_great_game/objects/game_object.clj | 2 +- src/{ => cc/journeyman}/the_great_game/time.clj | 2 +- .../journeyman}/the_great_game/utils.clj | 2 +- .../the_great_game/world/heightmap.clj | 9 +++++---- .../the_great_game/world/location.clj | 2 +- .../journeyman}/the_great_game/world/mw.clj | 2 +- .../journeyman}/the_great_game/world/routes.clj | 4 ++-- .../journeyman}/the_great_game/world/run.clj | 10 +++++----- .../journeyman}/the_great_game/world/world.clj | 2 +- .../the_great_game/gossip/gossip_test.clj | 4 ++++ .../the_great_game/gossip/news_items_test.clj | 7 ++++--- .../the_great_game/merchants/markets_test.clj | 10 +++++----- .../merchants/merchant_utils_test.clj | 9 +++++---- .../the_great_game/merchants/planning_test.clj | 8 ++++---- .../journeyman}/the_great_game/time_test.clj | 6 ++++-- .../journeyman}/the_great_game/utils_test.clj | 4 ++-- .../the_great_game/world/location_test.clj | 4 ++-- .../the_great_game/world/routes_test.clj | 6 +++--- .../the_great_game/world/world_test.clj | 4 ++++ test/the_great_game/gossip/gossip_test.clj | 4 ---- test/the_great_game/world/world_test.clj | 4 ---- workspace.code-workspace | 17 +++++++++++++++++ 34 files changed, 107 insertions(+), 81 deletions(-) create mode 100644 .calva/output-window/.clj-kondo/config.edn rename src/{ => cc/journeyman}/the_great_game/agent/agent.clj (92%) rename src/{ => cc/journeyman}/the_great_game/gossip/gossip.clj (90%) rename src/{ => cc/journeyman}/the_great_game/gossip/news_items.clj (97%) rename src/{ => cc/journeyman}/the_great_game/merchants/markets.clj (95%) rename src/{ => cc/journeyman}/the_great_game/merchants/merchant_utils.clj (98%) rename src/{ => cc/journeyman}/the_great_game/merchants/merchants.clj (94%) rename src/{ => cc/journeyman}/the_great_game/merchants/planning.clj (93%) rename src/{ => cc/journeyman}/the_great_game/merchants/strategies/simple.clj (92%) rename src/{ => cc/journeyman}/the_great_game/objects/container.clj (67%) rename src/{ => cc/journeyman}/the_great_game/objects/game_object.clj (91%) rename src/{ => cc/journeyman}/the_great_game/time.clj (99%) rename src/{ => cc/journeyman}/the_great_game/utils.clj (96%) rename src/{ => cc/journeyman}/the_great_game/world/heightmap.clj (97%) rename src/{ => cc/journeyman}/the_great_game/world/location.clj (96%) rename src/{ => cc/journeyman}/the_great_game/world/mw.clj (91%) rename src/{ => cc/journeyman}/the_great_game/world/routes.clj (93%) rename src/{ => cc/journeyman}/the_great_game/world/run.clj (75%) rename src/{ => cc/journeyman}/the_great_game/world/world.clj (99%) create mode 100644 test/cc/journeyman/the_great_game/gossip/gossip_test.clj rename test/{ => cc/journeyman}/the_great_game/gossip/news_items_test.clj (95%) rename test/{ => cc/journeyman}/the_great_game/merchants/markets_test.clj (92%) rename test/{ => cc/journeyman}/the_great_game/merchants/merchant_utils_test.clj (92%) rename test/{ => cc/journeyman}/the_great_game/merchants/planning_test.clj (92%) rename test/{ => cc/journeyman}/the_great_game/time_test.clj (91%) rename test/{ => cc/journeyman}/the_great_game/utils_test.clj (75%) rename test/{ => cc/journeyman}/the_great_game/world/location_test.clj (90%) rename test/{ => cc/journeyman}/the_great_game/world/routes_test.clj (84%) create mode 100644 test/cc/journeyman/the_great_game/world/world_test.clj delete mode 100644 test/the_great_game/gossip/gossip_test.clj delete mode 100644 test/the_great_game/world/world_test.clj create mode 100644 workspace.code-workspace diff --git a/.calva/output-window/.clj-kondo/config.edn b/.calva/output-window/.clj-kondo/config.edn new file mode 100644 index 0000000..1a10f5a --- /dev/null +++ b/.calva/output-window/.clj-kondo/config.edn @@ -0,0 +1 @@ +^:replace {:linters {}} \ No newline at end of file diff --git a/.gitignore b/.gitignore index db35160..ee4f1e6 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ pom.xml.asc .cpcache/ *~ + +.calva/output-window/output.calva-repl diff --git a/doc/building_on_microworld.md b/doc/building_on_microworld.md index 1819f7e..5b5ac3f 100644 --- a/doc/building_on_microworld.md +++ b/doc/building_on_microworld.md @@ -6,4 +6,4 @@ First and foremost, it's slow, and both processor and memory hungry. That means Of course it would be possible to do a run at one km scale top identify areas which would support settlement, and then to do a run on a ten metre grid on each of those areas to more precisely plot settlement. That's an idea which I haven't yet explored, which might prove fruitful. -Secondly, being a cellular automaton, MicroWorld works on a grid. This means that everything is grid aligned, which is absolutely not what I want! So I think the way to leverage this is to use Microworld to establish which kilometre square cells om the grid should be populated (and roughly with what), and then switch to ad hoc code to populate those cells. +Secondly, being a cellular automaton, MicroWorld works on a grid. This means that everything is grid aligned, which is absolutely not what I want! So I think the way to leverage this is to use MicroWorld to establish which kilometre square cells om the grid should be populated (and roughly with what), and then switch to *ad hoc* code to populate those cells. diff --git a/src/the_great_game/agent/agent.clj b/src/cc/journeyman/the_great_game/agent/agent.clj similarity index 92% rename from src/the_great_game/agent/agent.clj rename to src/cc/journeyman/the_great_game/agent/agent.clj index 43d8ff6..79b4c99 100644 --- a/src/the_great_game/agent/agent.clj +++ b/src/cc/journeyman/the_great_game/agent/agent.clj @@ -1,4 +1,4 @@ -(ns the-great-game.agent.agent +(ns cc.journeyman.the-great-game.agent.agent "Anything in the game world with agency" (:require [the-great-game.objects.game-object :refer [ProtoObject]] [the-great-game.objects.container :refer [ProtoContainer]])) @@ -35,9 +35,10 @@ "Returns a sequence of effects an actor intends, as a consequence of acting. The encoding of these is not yet defined.")) -;; (defrecord Agent -;; "A default agent." -;; ProtoObject -;; ProtoContainer -;; ProtoAgent -;; ) +(defrecord Agent + ;; "A default agent." + [name home tribe] + ProtoObject + ProtoContainer + ProtoAgent +) diff --git a/src/the_great_game/gossip/gossip.clj b/src/cc/journeyman/the_great_game/gossip/gossip.clj similarity index 90% rename from src/the_great_game/gossip/gossip.clj rename to src/cc/journeyman/the_great_game/gossip/gossip.clj index af743f3..ee19889 100644 --- a/src/the_great_game/gossip/gossip.clj +++ b/src/cc/journeyman/the_great_game/gossip/gossip.clj @@ -1,7 +1,7 @@ -(ns the-great-game.gossip.gossip +(ns cc.journeyman.the-great-game.gossip.gossip "Interchange of news events between gossip agents" - (:require [the-great-game.utils :refer [deep-merge]] - [the-great-game.gossip.news-items :refer [learn-news-item]])) + (:require [cc.journeyman.the-great-game.utils :refer [deep-merge]] + [cc.journeyman.the-great-game.gossip.news-items :refer [learn-news-item]])) ;; Note that habitual travellers are all gossip agents; specifically, at this ;; stage, that means merchants. When merchants are moved we also need to diff --git a/src/the_great_game/gossip/news_items.clj b/src/cc/journeyman/the_great_game/gossip/news_items.clj similarity index 97% rename from src/the_great_game/gossip/news_items.clj rename to src/cc/journeyman/the_great_game/gossip/news_items.clj index 2b02479..988a7da 100644 --- a/src/the_great_game/gossip/news_items.clj +++ b/src/cc/journeyman/the_great_game/gossip/news_items.clj @@ -1,7 +1,7 @@ -(ns the-great-game.gossip.news-items +(ns cc.journeyman.the-great-game.gossip.news-items "Categories of news events interesting to gossip agents" - (:require [the-great-game.world.location :refer [distance-between]] - [the-great-game.time :refer [game-time]])) + (:require [cc.journeyman.the-great-game.world.location :refer [distance-between]] + [cc.journeyman.the-great-game.time :refer [game-time]])) ;; The ideas here are based on the essay 'The spread of knowledge in a large ;; game world', q.v.; they've advanced a little beyond that and will doubtless diff --git a/src/the_great_game/merchants/markets.clj b/src/cc/journeyman/the_great_game/merchants/markets.clj similarity index 95% rename from src/the_great_game/merchants/markets.clj rename to src/cc/journeyman/the_great_game/merchants/markets.clj index c4f0898..09bce1a 100644 --- a/src/the_great_game/merchants/markets.clj +++ b/src/cc/journeyman/the_great_game/merchants/markets.clj @@ -1,7 +1,7 @@ -(ns the-great-game.merchants.markets +(ns cc.journeyman.the-great-game.merchants.markets "Adjusting quantities and prices in markets." (:require [taoensso.timbre :as l :refer [info error]] - [the-great-game.utils :refer [deep-merge]])) + [cc.journeyman.the-great-game.utils :refer [deep-merge]])) (defn new-price "If `stock` is greater than the maximum of `supply` and `demand`, then diff --git a/src/the_great_game/merchants/merchant_utils.clj b/src/cc/journeyman/the_great_game/merchants/merchant_utils.clj similarity index 98% rename from src/the_great_game/merchants/merchant_utils.clj rename to src/cc/journeyman/the_great_game/merchants/merchant_utils.clj index 9cfb5b4..ae6b8b0 100644 --- a/src/the_great_game/merchants/merchant_utils.clj +++ b/src/cc/journeyman/the_great_game/merchants/merchant_utils.clj @@ -1,4 +1,4 @@ -(ns the-great-game.merchants.merchant-utils +(ns cc.journeyman.the-great-game.merchants.merchant-utils "Useful functions for doing low-level things with merchants.") (defn expected-price diff --git a/src/the_great_game/merchants/merchants.clj b/src/cc/journeyman/the_great_game/merchants/merchants.clj similarity index 94% rename from src/the_great_game/merchants/merchants.clj rename to src/cc/journeyman/the_great_game/merchants/merchants.clj index 9ef160d..fe0e319 100644 --- a/src/the_great_game/merchants/merchants.clj +++ b/src/cc/journeyman/the_great_game/merchants/merchants.clj @@ -1,4 +1,4 @@ -(ns the-great-game.merchants.merchants +(ns cc.journeyman.the-great-game.merchants.merchants "Trade planning for merchants, primarily." (:require [taoensso.timbre :as l :refer [info error spy]] [the-great-game.utils :refer [deep-merge]] diff --git a/src/the_great_game/merchants/planning.clj b/src/cc/journeyman/the_great_game/merchants/planning.clj similarity index 93% rename from src/the_great_game/merchants/planning.clj rename to src/cc/journeyman/the_great_game/merchants/planning.clj index e784036..dd2e622 100644 --- a/src/the_great_game/merchants/planning.clj +++ b/src/cc/journeyman/the_great_game/merchants/planning.clj @@ -1,12 +1,12 @@ -(ns the-great-game.merchants.planning +(ns cc.journeyman.the-great-game.merchants.planning "Trade planning for merchants, primarily. This follows a simple-minded generate-and-test strategy and currently generates plans for all possible routes from the current location. This may not scale. Also, routes do not currently have cost or risk associated with them." - (:require [the-great-game.utils :refer [deep-merge make-target-filter]] - [the-great-game.merchants.merchant-utils :refer :all] - [the-great-game.world.routes :refer [find-route]] - [the-great-game.world.world :refer [actual-price default-world]])) + (:require [cc.journeyman.the-great-game.utils :refer [deep-merge make-target-filter]] + [cc.journeyman.the-great-game.merchants.merchant-utils :refer [can-afford can-carry expected-price]] + [cc.journeyman.the-great-game.world.routes :refer [find-route]] + [cc.journeyman.the-great-game.world.world :refer [actual-price default-world]])) (defn generate-trade-plans "Generate all possible trade plans for this `merchant` and this `commodity` diff --git a/src/the_great_game/merchants/strategies/simple.clj b/src/cc/journeyman/the_great_game/merchants/strategies/simple.clj similarity index 92% rename from src/the_great_game/merchants/strategies/simple.clj rename to src/cc/journeyman/the_great_game/merchants/strategies/simple.clj index d43e952..7ccbdb2 100644 --- a/src/the_great_game/merchants/strategies/simple.clj +++ b/src/cc/journeyman/the_great_game/merchants/strategies/simple.clj @@ -1,4 +1,4 @@ -(ns the-great-game.merchants.strategies.simple +(ns cc.journeyman.the-great-game.merchants.strategies.simple "Default trading strategy for merchants. The simple strategy buys a single product in the local market if there is @@ -7,12 +7,12 @@ profitably, moves towards home with no cargo. If at home and no commodity can be traded profitably, does not move." (:require [taoensso.timbre :as l :refer [info error spy]] - [the-great-game.utils :refer [deep-merge]] - [the-great-game.gossip.gossip :refer [move-gossip]] - [the-great-game.merchants.planning :refer :all] - [the-great-game.merchants.merchant-utils :refer + [cc.journeyman.the-great-game.utils :refer [deep-merge]] + [cc.journeyman.the-great-game.gossip.gossip :refer [move-gossip]] + [cc.journeyman.the-great-game.merchants.planning :refer [augment-plan plan-trade select-cargo]] + [cc.journeyman.the-great-game.merchants.merchant-utils :refer [add-stock add-known-prices]] - [the-great-game.world.routes :refer [find-route]])) + [cc.journeyman.the-great-game.world.routes :refer [find-route]])) (defn plan-and-buy "Return a world like this `world`, in which this `merchant` has planned diff --git a/src/the_great_game/objects/container.clj b/src/cc/journeyman/the_great_game/objects/container.clj similarity index 67% rename from src/the_great_game/objects/container.clj rename to src/cc/journeyman/the_great_game/objects/container.clj index 80a18ce..5d5b48f 100644 --- a/src/the_great_game/objects/container.clj +++ b/src/cc/journeyman/the_great_game/objects/container.clj @@ -1,6 +1,6 @@ -(ns the-great-game.objects.container +(ns cc.journeyman.the-great-game.objects.container (:require - [the-great-game.objects.game-object :refer :all])) + [cc.journeyman.the-great-game.objects.game-object :refer :all])) (defprotocol ProtoContainer (contents diff --git a/src/the_great_game/objects/game_object.clj b/src/cc/journeyman/the_great_game/objects/game_object.clj similarity index 91% rename from src/the_great_game/objects/game_object.clj rename to src/cc/journeyman/the_great_game/objects/game_object.clj index 25c878c..992b378 100644 --- a/src/the_great_game/objects/game_object.clj +++ b/src/cc/journeyman/the_great_game/objects/game_object.clj @@ -1,4 +1,4 @@ -(ns the-great-game.objects.game-object +(ns cc.journeyman.the-great-game.objects.game-object "Anything at all in the game world") (defprotocol ProtoObject diff --git a/src/the_great_game/time.clj b/src/cc/journeyman/the_great_game/time.clj similarity index 99% rename from src/the_great_game/time.clj rename to src/cc/journeyman/the_great_game/time.clj index 2378937..b5bf753 100644 --- a/src/the_great_game/time.clj +++ b/src/cc/journeyman/the_great_game/time.clj @@ -1,4 +1,4 @@ -(ns the-great-game.time +(ns cc.journeyman.the-great-game.time (:require [clojure.string :as s])) (def game-start-time diff --git a/src/the_great_game/utils.clj b/src/cc/journeyman/the_great_game/utils.clj similarity index 96% rename from src/the_great_game/utils.clj rename to src/cc/journeyman/the_great_game/utils.clj index 698eefc..ff00cee 100644 --- a/src/the_great_game/utils.clj +++ b/src/cc/journeyman/the_great_game/utils.clj @@ -1,4 +1,4 @@ -(ns the-great-game.utils) +(ns cc.journeyman.the-great-game.utils) (defn cyclic? "True if two or more elements of `route` are identical" diff --git a/src/the_great_game/world/heightmap.clj b/src/cc/journeyman/the_great_game/world/heightmap.clj similarity index 97% rename from src/the_great_game/world/heightmap.clj rename to src/cc/journeyman/the_great_game/world/heightmap.clj index 5f0378b..07864ae 100644 --- a/src/the_great_game/world/heightmap.clj +++ b/src/cc/journeyman/the_great_game/world/heightmap.clj @@ -1,10 +1,10 @@ -(ns the-great-game.world.heightmap +(ns cc.journeyman.the-great-game.world.heightmap "Functions dealing with the tessellated multi-layer heightmap." (:require [clojure.math.numeric-tower :refer [expt sqrt]] [mw-engine.core :refer []] [mw-engine.heightmap :refer [apply-heightmap]] - [mw-engine.utils :refer [get-cell in-bounds? map-world]] - [the-great-game.utils :refer [value-or-default]])) + [mw-engine.utils :refer [get-cell in-bounds? map-world scale-world]] + [cc.journeyman.the-great-game.utils :refer [value-or-default]])) ;; It's not at all clear to me yet what the workflow for getting a MicroWorld ;; map into The Great Game, and whether it passes through Walkmap to get here. @@ -129,7 +129,8 @@ (>= (:x cell) x-offset) (< (:x cell) (+ x-offset width))) cell)) - row))))))))) + row))))) + grid)))) (defn get-surface "Return, as a vector of vectors of cells represented as Clojure maps, a diff --git a/src/the_great_game/world/location.clj b/src/cc/journeyman/the_great_game/world/location.clj similarity index 96% rename from src/the_great_game/world/location.clj rename to src/cc/journeyman/the_great_game/world/location.clj index b7c3fd0..b4a5c3a 100644 --- a/src/the_great_game/world/location.clj +++ b/src/cc/journeyman/the_great_game/world/location.clj @@ -1,4 +1,4 @@ -(ns the-great-game.world.location +(ns cc.journeyman.the-great-game.world.location "Functions dealing with location in the world." (:require [clojure.math.numeric-tower :refer [expt sqrt]])) diff --git a/src/the_great_game/world/mw.clj b/src/cc/journeyman/the_great_game/world/mw.clj similarity index 91% rename from src/the_great_game/world/mw.clj rename to src/cc/journeyman/the_great_game/world/mw.clj index 7d6436a..162a64c 100644 --- a/src/the_great_game/world/mw.clj +++ b/src/cc/journeyman/the_great_game/world/mw.clj @@ -1,4 +1,4 @@ -(ns the-great-game.world.mw +(ns cc.journeyman.the-great-game.world.mw "Functions dealing with building a great game world from a MicroWorld world." (:require [clojure.math.numeric-tower :refer [expt sqrt]] [mw-engine.core :refer []] diff --git a/src/the_great_game/world/routes.clj b/src/cc/journeyman/the_great_game/world/routes.clj similarity index 93% rename from src/the_great_game/world/routes.clj rename to src/cc/journeyman/the_great_game/world/routes.clj index c45debc..64585b9 100644 --- a/src/the_great_game/world/routes.clj +++ b/src/cc/journeyman/the_great_game/world/routes.clj @@ -1,6 +1,6 @@ -(ns the-great-game.world.routes +(ns cc.journeyman.the-great-game.world.routes "Conceptual (plan level) routes, represented as tuples of location ids." - (:require [the-great-game.utils :refer [cyclic?]])) + (:require [cc.journeyman.the-great-game.utils :refer [cyclic?]])) (defn find-routes "Find routes from among these `routes` from `from`; if `to` is supplied, diff --git a/src/the_great_game/world/run.clj b/src/cc/journeyman/the_great_game/world/run.clj similarity index 75% rename from src/the_great_game/world/run.clj rename to src/cc/journeyman/the_great_game/world/run.clj index b324101..081d247 100644 --- a/src/the_great_game/world/run.clj +++ b/src/cc/journeyman/the_great_game/world/run.clj @@ -1,12 +1,12 @@ -(ns the-great-game.world.run +(ns cc.journeyman.the-great-game.world.run "Run the whole simulation" (:require [environ.core :refer [env]] [taoensso.timbre :as timbre] [taoensso.timbre.appenders.3rd-party.rotor :as rotor] - [the-great-game.gossip.gossip :as g] - [the-great-game.merchants.merchants :as m] - [the-great-game.merchants.markets :as k] - [the-great-game.world.world :as w])) + [cc.journeyman.the-great-game.gossip.gossip :as g] + [cc.journeyman.the-great-game.merchants.merchants :as m] + [cc.journeyman.the-great-game.merchants.markets :as k] + [cc.journeyman.the-great-game.world.world :as w])) (defn init ([] diff --git a/src/the_great_game/world/world.clj b/src/cc/journeyman/the_great_game/world/world.clj similarity index 99% rename from src/the_great_game/world/world.clj rename to src/cc/journeyman/the_great_game/world/world.clj index 9334237..4d873dc 100644 --- a/src/the_great_game/world/world.clj +++ b/src/cc/journeyman/the_great_game/world/world.clj @@ -1,4 +1,4 @@ -(ns the-great-game.world.world +(ns cc.journeyman.the-great-game.world.world "Access to data about the world") ;;; The world has to work either as map or a database. Initially, and for diff --git a/test/cc/journeyman/the_great_game/gossip/gossip_test.clj b/test/cc/journeyman/the_great_game/gossip/gossip_test.clj new file mode 100644 index 0000000..87b15b4 --- /dev/null +++ b/test/cc/journeyman/the_great_game/gossip/gossip_test.clj @@ -0,0 +1,4 @@ +(ns cc.journeyman.the-great-game.gossip.gossip-test + (:require [clojure.test :refer :all] + [cc.journeyman.the-great-game.gossip.gossip :refer :all])) + diff --git a/test/the_great_game/gossip/news_items_test.clj b/test/cc/journeyman/the_great_game/gossip/news_items_test.clj similarity index 95% rename from test/the_great_game/gossip/news_items_test.clj rename to test/cc/journeyman/the_great_game/gossip/news_items_test.clj index ca7788e..79137a6 100644 --- a/test/the_great_game/gossip/news_items_test.clj +++ b/test/cc/journeyman/the_great_game/gossip/news_items_test.clj @@ -1,7 +1,8 @@ -(ns the-great-game.gossip.news-items-test +(ns cc.journeyman.the-great-game.gossip.news-items-test (:require [clojure.test :refer :all] - [the-great-game.gossip.news-items :refer :all])) - + [cc.journeyman.the-great-game.gossip.news-items :refer + [degrade-location infer interest-in-location interesting-location? + learn-news-item make-all-inferences]])) (deftest location-test (testing "Interest in locations" diff --git a/test/the_great_game/merchants/markets_test.clj b/test/cc/journeyman/the_great_game/merchants/markets_test.clj similarity index 92% rename from test/the_great_game/merchants/markets_test.clj rename to test/cc/journeyman/the_great_game/merchants/markets_test.clj index 7cacd30..e86d173 100644 --- a/test/the_great_game/merchants/markets_test.clj +++ b/test/cc/journeyman/the_great_game/merchants/markets_test.clj @@ -1,8 +1,8 @@ -(ns the-great-game.merchants.markets-test +(ns cc.journeyman.the-great-game.merchants.markets-test (:require [clojure.test :refer :all] - [the-great-game.utils :refer [deep-merge]] - [the-great-game.world.world :refer [default-world]] - [the-great-game.merchants.markets :refer :all])) + [cc.journeyman.the-great-game.utils :refer [deep-merge]] + [cc.journeyman.the-great-game.world.world :refer [default-world]] + [cc.journeyman.the-great-game.merchants.markets :refer [adjust-quantity-and-price new-price run]])) (deftest new-price-test @@ -23,7 +23,7 @@ "The greater the relative oversupply, the more prices should fall") )) -(deftest adjust-qunatity-and-price-test +(deftest adjust-quantity-and-price-test (testing "Adjustment in quantity and price: supply only." (let [world (deep-merge default-world diff --git a/test/the_great_game/merchants/merchant_utils_test.clj b/test/cc/journeyman/the_great_game/merchants/merchant_utils_test.clj similarity index 92% rename from test/the_great_game/merchants/merchant_utils_test.clj rename to test/cc/journeyman/the_great_game/merchants/merchant_utils_test.clj index 086c691..69f40fe 100644 --- a/test/the_great_game/merchants/merchant_utils_test.clj +++ b/test/cc/journeyman/the_great_game/merchants/merchant_utils_test.clj @@ -1,8 +1,9 @@ -(ns the-great-game.merchants.merchant-utils-test +(ns cc.journeyman.the-great-game.merchants.merchant-utils-test (:require [clojure.test :refer :all] - [the-great-game.utils :refer [deep-merge]] - [the-great-game.world.world :refer [default-world]] - [the-great-game.merchants.merchant-utils :refer :all])) + [cc.journeyman.the-great-game.utils :refer [deep-merge]] + [cc.journeyman.the-great-game.world.world :refer [default-world]] + [cc.journeyman.the-great-game.merchants.merchant-utils :refer + [add-stock burden can-afford can-carry expected-price]])) (deftest expected-price-test (testing "Anticipated prices in markets" diff --git a/test/the_great_game/merchants/planning_test.clj b/test/cc/journeyman/the_great_game/merchants/planning_test.clj similarity index 92% rename from test/the_great_game/merchants/planning_test.clj rename to test/cc/journeyman/the_great_game/merchants/planning_test.clj index 5662e35..ef7595b 100644 --- a/test/the_great_game/merchants/planning_test.clj +++ b/test/cc/journeyman/the_great_game/merchants/planning_test.clj @@ -1,8 +1,8 @@ -(ns the-great-game.merchants.planning-test +(ns cc.journeyman.the-great-game.merchants.planning-test (:require [clojure.test :refer :all] - [the-great-game.utils :refer [deep-merge]] - [the-great-game.world.world :refer [default-world]] - [the-great-game.merchants.planning :refer :all])) + [cc.journeyman.the-great-game.utils :refer [deep-merge]] + [cc.journeyman.the-great-game.world.world :refer [default-world]] + [cc.journeyman.the-great-game.merchants.planning :refer [plan-trade select-cargo]])) (deftest plan-trade-test diff --git a/test/the_great_game/time_test.clj b/test/cc/journeyman/the_great_game/time_test.clj similarity index 91% rename from test/the_great_game/time_test.clj rename to test/cc/journeyman/the_great_game/time_test.clj index 4727fdd..eb5d856 100644 --- a/test/the_great_game/time_test.clj +++ b/test/cc/journeyman/the_great_game/time_test.clj @@ -1,7 +1,9 @@ -(ns the-great-game.time-test +(ns cc.journeyman.the-great-game.time-test (:require [clojure.test :refer :all] ;; [clojure.core.async :refer [thread