kevinddchen / machikoro Goto Github PK
View Code? Open in Web Editor NEWImplementation of the Machi Koro boardgame
License: MIT License
Implementation of the Machi Koro boardgame
License: MIT License
Currently, for variable supply we set the number of copies for each Major (purple) establishment to numPlayers
. In reality, this should actually be 4
when playing with <= 4 players, and 5
when playing with 5 players, and the extra copies are removed from the supply when they are not needed so that newer establishments can be added.
The effect is that when playing with 2 or 3 players, the chances of Major establishments being in the supply is lower than what they should be.
It is possible to change the name of a player while waiting in the room.
https://boardgame.io/documentation/#/api/Lobby?id=updating-a-players-metadata
This might not be possible, but the Harbor expansion choices should be undoable if there is no Tuna Boat roll performed.
Suppose a player owns the Train Station, Radio Tower, and Amusement Park. If the player rolls doubles but then re-rolls with one die, they will get a second turn. The intended behavior is that they should not get a second turn.
We currently have no tests. That means if we push breaking code, we have no idea until it breaks. We need tests.
React should have a built-in testing suite.
One of the uncompleted tasks in #71, the non-null assertion in the various parts of the typescript source code causes the GitHub linter to fail. It can be resolved by running npm run prettier:fix
, but it appears to be a quick fix and not a long term solution.
This was discussed in #97 (comment).
In #105, I removed some custom middleware from the server-side code, which did:
The primary issue was that the "hack" of reading the body of the ctx.req
and then putting the bytes back into the stream doesn't work over the web. This line:
machikoro/src/server/middleware.ts
Line 24 in 3f04230
for await (const chunk in ctx.req) {
...
}
but then I do not know how to but the bytes back into the stream.
Some possible resolutions:
boardgame.io
repo.In Machi Koro 1, a player can buy a landmark by clicking on a landmark that is not in their PlayerInfo
component. This should not happen.
Crashes when a player rolls 12 w/o Harbor or Radio Tower and an opponent has Harbor + Tuna Boat. Screen goes white in production.
Everything is fixed when the browser is refreshed.
This is caused due to a strange interaction between ctx.random
and the automatic commit roll feature.
The player-facing game log stores the 200 most recent lines in the game state. While this is convenient to access, this is memory inefficient, since each line of the log will be redundantly copied in several game states. We need a new implementation for the game log that stores each line of the log only once.
One possibility would be to store only the new lines of the log to the game state. When it comes time to render the game log, the client would go through the previous game states and pull those log lines.
This is because the log entry takes obj
, which takes the raw money amount to take, not min
which considers the remaining coins a player has.
Hi, does there exist future release plan for millionaire row expansion?
Lobby will never find games
during the game there is a lack of chat.
We have a regression where two players can share the same name.
The client has the ability to recall the player's name but the lobby loads a blank field in the "Enter Player Name" input every time it loads. This means that the player has to re-enter their name when they accidentally create a room, leave and return to the lobby or something similar.
Possible solutions are to initialize a blank state at the start of the game or to be able to get the client to check if a name has already been entered at the start.
With the addition of a chat box that occupies the same footprint as the game log (#97), it may be useful to have an indicator that appears when the other tab has new updates. For example, when the Game Log is selected, an indicator would appear when there are new Chat messages. Similarly, if the Chat is selected, an indicator would appear when the game progresses and there are new log messages related to the game.
Here are two interesting features we could implement now that we have spectator mode and a chat:
(removed good first issue
tag as it might be a bit more involved in having to add other features before getting the above to work)
The amusement park activates whenever a player has rolled doubles, even if they re-roll
I want to be able to display a custom message right when the game starts. For example in MK2, I want it to display '(Start of initial build phase)' immediately when the game starts. In the future this can be used to include information about the game settings like which version etc.
I spent more than 3 hours today trying to figure out how to do this (and a few hours in another session before logOtherEvent
was implemented [#92] ) and there has been no progress on this at all ๐ ๐ ๐
I'm working with the .\src\game\machikoro.ts file. Apparently a line like Log.logOtherEvent(G, 'TEST')
only works in the list of const
functions in the Moves section (although it shouldn't be there). I tried creating a move helper but it didn't work. I tried defining it in the setup (Game section after lines 1012) and it didn't work either. I think there has to be a separate function that is not written like a Move const
function and is called when the game initializes. Unfortunately I'm too noob at typescript and can't tell the difference between const X: Y => (Z) =>
and const X = (Z: Y): void =>
to know how to write this correctly.
Add a timer for lobby giving how long a room has been up
Best choice is to make it disappear when moused over. This reduces misclicks in the game
When following instructions to run Machi Koro locally, NODE_PATH is only recognized on macOS/Linux terminals and not on Windows cmd. (https://stackoverflow.com/a/63270514)
As a result, npm run serve:dev
or npm run serve:prod
will generate the following error when running on Windows:
'NODE_PATH' is not recognized as an internal or external command,
operable program or batch file.
One solution to solve this issue is to do the following:
cross-env
package with npm install cross-env
cross-env
with the serve:dev
and serve:prod
commands by updating package.json
, i.e.
"serve:dev": "cross-env NODE_PATH=./src ts-node-dev ./src/server/index.ts",
"serve:prod": "cross-env NODE_PATH=./src ts-node --transpileOnly ./src/server/index.ts",
However, checks will need to be performed to see if this solution affects other OS systems. If it doesn't, then other solutions will have to be proposed.
With hybrid supply, the establishment marketplace is divided into rows: one row for establishments with rolls 1-6, one row for establishments with rolls 7-12, and one row for major (purple) establishments. These rows should not mix during the game.
I made a to-do list in 2023 to update the UI, but was not able to work on it yet so I'll just leave my notes here in case I pick it up again.
Feel free add and/or suggest new items for the next UI update.
Tuna boat is not implemented correctly: one roll should be made for all players
Our app currently uses copyrighted materials. We need to reskin each game object and create new assets. Ideally, the theme we come up with should parallel the original intent of the game (kind of like how https://richup.io/ reskined monopoly)
Would be nice if the log printed the establishment that was chosen and was put under renovations.
If a user has corrupted credentials, they will still be allowed into the room but not get any feedback that their credentials are no good any more.
To replicate: join a game, refresh, edit local storage, and change the value associated to the matchID.
The logs say 1 coins
when it should be 1 coin
.
It is overly verbose and complex.
In Machi Koro 2, the game log shows the winning message twice if a player buys Launch Pad as their third landmark. The log should only show this message once.
Should say -$5
instead of $-5
Should not grow horizontally with player name
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.