{"id":20722102,"url":"https://github.com/Ruddle/EconomySimulator","last_synced_at":"2025-05-10T23:32:28.553Z","repository":{"id":195753595,"uuid":"693587515","full_name":"Ruddle/EconomySimulator","owner":"Ruddle","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-19T10:32:00.000Z","size":11,"stargazers_count":9,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-17T03:36:09.431Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ruddle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-19T10:18:58.000Z","updated_at":"2024-11-14T21:10:44.000Z","dependencies_parsed_at":"2023-09-19T13:20:26.237Z","dependency_job_id":null,"html_url":"https://github.com/Ruddle/EconomySimulator","commit_stats":null,"previous_names":["ruddle/economysimulator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruddle%2FEconomySimulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruddle%2FEconomySimulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruddle%2FEconomySimulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ruddle%2FEconomySimulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ruddle","download_url":"https://codeload.github.com/Ruddle/EconomySimulator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253497319,"owners_count":21917683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T03:34:03.964Z","updated_at":"2025-05-10T23:32:23.541Z","avatar_url":"https://github.com/Ruddle.png","language":"JavaScript","funding_links":[],"categories":["[💸 post-capitalism](https://github.com/stars/ketsapiwiq/lists/post-capitalism)"],"sub_categories":[],"readme":"# EconomySimulator\n\nCode of the simulator, and its display, from the blog post [Building an economy simulator from scratch](https://thomassimon.dev/ps/4).\nIt uses mithril.js.\n\n# How to use\n\nExample of usage:\nSimulation 25 from the blog post\n\n```js\nimport m from \"mithril\";\nimport * as economy from \"./economy.js\";\n\neconomy.init(m);\n\nlet options = {\n  money: true,\n  overconsume: true,\n  bidding: true,\n  sellMin: true,\n  qol2: true,\n  highNumbers: true,\n  truncate: true,\n  resourcesCons: [\"food\", \"water\", \"wood\"],\n  peopleOpt: [\n    { producer: \"food\", money: 1000 },\n    { producer: \"food\", money: 1000 },\n    { producer: \"food\", money: 1000 },\n    { producer: \"wood\", money: 1000 },\n    { producer: \"water\", money: 1000 },\n    { producer: \"gov\", money: 1000 },\n    { producer: \"gov\", money: 1000 },\n    { producer: \"gov\", money: 1000 },\n  ],\n  prices: { food: 100, wood: 100, water: 100 },\n  gov: {\n    resources: { money: 1000 },\n    tax: 3,\n    autoTax: false,\n    print: true,\n    fluid: { mul: 1.5 },\n  },\n};\n\nm.mount(document.body, { view: () =\u003e m(economy.Root, options) });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRuddle%2FEconomySimulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRuddle%2FEconomySimulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRuddle%2FEconomySimulator/lists"}