Code Monkey home page Code Monkey logo

hansa's Introduction

About Hansa

A League is made up of Cities

City:

  • population
  • production function
  • utility function

Production function: production(labor) #=> goods

  • L labor units produce 1 good unit
  • N good units require L * N labor units
  • labor cost varies between goods and cities
  • labor cost is partly but not entirely determined by surrounding terrain

Utility function: utility(goods_consumed) # => utils

  • total happiness of inhabitants; depends on goods consumed
  • The additional utility from consuming one more unit of a good decreases as the amount of that good consumed increases (DMU = diminshing marginal utility) and increases as the amount of any other good increases (ICU = increasing complementary utility)
  • identical across cities
  • autarchy level: highest utility achieved without trade

Trade:

  • transportation requires labor, provided by the exporting city
  • transportation costs vary between cities (distance, water / land)
  • transportation is instant (every turn represents 1 year)
  • trade agreement? payment? matching coincidence of needs?

Gameplay:

  • Production / Consumption / Trade
  • Allocate labor towards production of specific goods
  • Allocate production towards consumption or trade (export)
  • No storage, so Consumption is: Production + Imports - Exports

Additionally

Worldmap:

  • (x,y) coordinates with (0,0) SW corner and (1,1) NE corner
    • consider: (x,y) coordinates with (-1,-1) SW corner and (1,1) NE corner
  • East coast and West coast (defined by x-axis)
  • The outermost coastal areas are islands: East Isles and West Isles
  • Inland from coastal areas are delta areas, not accessible by sea
  • East coast cities have water routes between them
  • West coast cities have water routes between them
  • No East-West water route
  • One river runs inland from high to low, providing an inland water route
  • One possible river-coast city (delta or coastal)
  • If river empties into delta, that city becomes available by sea (and river)
  • If river empties into coastal, still available by sea (and river)
  • Water routes require less transportation labor than land routes
  • Altitude affects river and land routes (downhill is cheaper)

hansa's People

Contributors

rickhull avatar

Stargazers

Brian Purgert avatar

Watchers

 avatar Brian Purgert avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.