This is an implementation of the Machi Koro board game. This app was developed using the React framework and the boardgame.io game engine.
Disclaimer: We do not own a license to the game.
The app is online and free to play at playmachikoro.herokuapp.com.
- Total: All establishments are available for purchase. This is the official supply variant of Machi Koro.
- Variable: 10 establishments are available for purchase. This is the official supply variant of the expansions.
- Hybrid: 5 establishments with rolls 1-6, 5 establishments with rolls 7+, and 2 major establishments are available for purchase. This is the official supply variant of Machi Koro 2.
In the Millionaire's Row expansion, there are certain uncommon plays that are not possible:
Demolition Company
cannot be activated afterCorn Field
. This is uncommon because you could get fewer coins.Loan Office
cannot be activated afterForest
orFlower Shop
. This is uncommon because you could get fewer coins.Moving Company
cannot be activated beforeMine
,Winery
, orApple Orchard
. This is done because (i) you could get fewer coins, and (ii) it is ambiguous whether establishments you give away should be activated, so this keeps things simple.Renovation Company
cannot be activated beforeTax Office
. This is uncommon because you could get fewer coins.Exhibit Hall
cannot be activated beforeTech Startup
(e.g. to activateLoan Office
). While this could give you more coins, (i) it is quite rare, and (ii) activatingTech Startup
first makes it more clean how many coins you have which can help with picking the establishment to activate.
First, install Node.js. Then, clone this repo and install the project dependencies.
git clone git@github.com:kevinddchen/machikoro.git
cd machikoro
npm install
We recommend using VS Code as your code editor. Some contribution guidelines:
- Run
npm run lint:fix
to run code linting and check for syntax errors. - Run
npm run prettier:fix
to autoformat the code. - Run
npm run version:fix
to update the version in src/version.ts with the version in package.json.
In a terminal window, run the following command:
npm run serve:dev
This will start the game server. Without closing the window, open a new terminal window and run:
npm run start
This will open the app in development mode at localhost:3000
in your browser.
There are some debugging tools which become unavailable in the production version of the app.
Additionally, any changes made in the source code will be automatically updated in the browser, which is very convenient.
To change the debug game settings, edit debugSetupData
in src/game/machikoro.ts.
You must first build the app by running,
npm run build
Once the app has been built, you start the game server by running the same command as above,
npm run serve:prod
The app will be hosted at localhost:80
.
If you open multiple browsers and go to the link (e.g. incognito mode) you can play with yourself.
The downside is that any changes in the code will not be reflected in the app until it is rebuilt.
First, install the Heroku CLI and log in by running heroku login
.
From the project root directory, run heroku git:remote -a playmachikoro
to add the Heroku remote to Git.
To deploy your local app, run
git push heroku main
This will only work if you are a collaborator.