boardzilla / boardzilla-core

Boardzilla core library
GNU Affero General Public License v3.0
180 stars 3 forks source link

Can't figure out how to use everyPlayer - maybe it's broken? #15

Closed mvolfik closed 8 months ago

mvolfik commented 8 months ago

Hi, I'm exploring this project and it seems like a promising framework, great job!

I'm struggling when trying to use everyPlayer. Here's a simple reproduction that I put together: I used the Simple game template from @boardzilla/create-game, with just a simple modification: instead of creating one central pool, I created a separate pool for each player, to prevent race conditions. Full diff here, if you npm install && npm run dev you get a full reproduction of my issue.

Everything works correctly with eachPlayer, but when I substitute it for everyPlayer, the game simply breaks: when I select a token, there isn't any state added in the devtools sidebar, and in console I get move may no longer be valid. retrying getPendingMoves.

Am I using this wrong, or is there some bug? Thanks

Edit to note: related discussion happened on Discord

aghull commented 8 months ago

Corrected in https://github.com/boardzilla/boardzilla-core/pull/13