Having found and corrected the error
in gateway
, have a look at
nearest_gateway
, below. The idea is that
nearest_gateway(From,Region,Gateway)
is true if Gateway is that
gateway to Region which is nearest to From. It could be used by a trader
who has started off some way from a particular region, and who wants to
move into that region before starting to trade.
Translate the definition into English. There is a bug in it (one I committed myself when writing the game); what is it?
Now, one can write a structurally similar predicate for finding the
cheapest wholesaler. Call it
cheapest_seller_in_region(Good,Region,Square)
. It is true when Square
offers the lowest price of any square selling Good within Region.
Define it!
You will find the answers in TRADER..