{"id":25631306,"url":"https://github.com/boompig/dominion","last_synced_at":"2026-05-02T22:33:33.310Z","repository":{"id":9633256,"uuid":"11563907","full_name":"boompig/dominion","owner":"boompig","description":"A bare-bones simulator and visualizer for the card game 'Dominion'","archived":false,"fork":false,"pushed_at":"2023-10-27T03:19:04.000Z","size":4775,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-09T22:00:51.832Z","etag":null,"topics":["board-game","game-ai","nodejs","vuejs2"],"latest_commit_sha":null,"homepage":"https://boompig.github.io/dominion","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boompig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-21T15:51:41.000Z","updated_at":"2021-10-04T20:45:56.000Z","dependencies_parsed_at":"2023-01-11T20:12:57.208Z","dependency_job_id":null,"html_url":"https://github.com/boompig/dominion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boompig%2Fdominion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boompig%2Fdominion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boompig%2Fdominion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boompig%2Fdominion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boompig","download_url":"https://codeload.github.com/boompig/dominion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240230943,"owners_count":19768749,"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":["board-game","game-ai","nodejs","vuejs2"],"created_at":"2025-02-22T20:19:42.681Z","updated_at":"2026-05-02T22:33:28.275Z","avatar_url":"https://github.com/boompig.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dominion\n\nA bare-bones simulator and visualizer for the card game [Dominion](https://boardgamegeek.com/boardgame/36218/dominion) in JavaScript. Simulator can be run headless from command-line with node.js or in the browser. Visualization powered by React.\n\nCurrently only supports standard cards. Card descriptions can be found [here](https://www.ultraboardgames.com/dominion/cards.php).\n\n## Run\n\n### Browser\n\n`http-server` from root directory. That's it.\n\n### Command Line\n\nThe simulation can be run headless from the command line. Run\n\n```\nts-node cli.js\n```\n\nThe `--help` flag will give you available options.\n\nTo run the visualization, start up a web server from this directory, for example run `http-server`.\nSee building instructions on building the bundle first.\n\n\n## Building\n\nShared files (between browser and Node) can be found in the `/src` directory. Build the bundle for browser with browserify.\n\n```\nyarn build\n```\n\n## Supported Cards\n\n- Adventurer\n- Bureaucrat\n- Cellar\n- Chancellor\n- Chapel\n- Council Room\n- Feast\n- Festival\n- Gardens\n- Laboratory\n- Library\n- Market\n- Mine\n- Moneylender\n- Remodel\n- Smithy\n- Spy\n- Thief\n- Village\n- Witch\n- Woodcutter\n- Workshop\n\n## Unsupported Cards\n\n- Moat\n- Militia\n- Throne Room\n\n### Adding New Cards\n\nSee `initCards` function in `src/game.js`.\n\n## Strategies\n\nI hand-coded a few AI strategies to test against the human opponent. Descriptions below. You can find the code in `player-strategies.js`.\n\n### Big Money\n\nEach turn, buy a province if you can afford it. Otherwise, buy gold or silver. If cannot afford either of those, buy nothing.\n\n### Smart Big Money\n\nSame as \"Big Money\", but buy Duchies near the end.\n\n### Smart Duchy\n\n- always go for province when you have 8\n- always go for duchy when you have 5\n- always go for smithy when you have 4\n- always go for silver when you have 3\n- go for gold when you have 6, if there are 4 or more provinces\n\n### Smart Smithy\n\n???\n\n### Big Money Smithy\n\n???\n\n## Lint \u0026 Test\n\n```\nyarn install\nyarn lint\nyarn test\n```\n\n## Uses\n\n* play dominion against computer opponent(s)\n* simulate strategies over large number of iterations to see their effectiveness\n\n## Implementation Details\n\n* written in JavaScript, with Angular framework and Bootstrap for prettiness\n* uses Underscore library for shuffling cards (Fisher-Yates shuffle)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboompig%2Fdominion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboompig%2Fdominion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboompig%2Fdominion/lists"}