Skip to content

New game: Plurality#305

Merged
Perlkonig merged 4 commits intoAbstractPlay:developfrom
jpneto:develop
Feb 5, 2026
Merged

New game: Plurality#305
Perlkonig merged 4 commits intoAbstractPlay:developfrom
jpneto:develop

Conversation

@jpneto
Copy link
Contributor

@jpneto jpneto commented Feb 5, 2026

Here's my working version of Plurality, a recent game of mine. The game rules are all implemented, together with the computation of areas and player scores.

There is one thing I couldn't solve, each player places a tromino, but the pieces only appear at the end of the third mouse click. Don't understand why...

@Perlkonig
Copy link
Member

In response to your question, it is likely a failure to set canrender: true in certain scenarios in validateMove(). I'll take a look.

@jpneto
Copy link
Contributor Author

jpneto commented Feb 5, 2026

In response to your question, it is likely a failure to set canrender: true in certain scenarios in validateMove(). I'll take a look.

Thanks. Some result.canrender = true; were definitely missing, but something else is missing, since the rendering is still not working.

Copy link
Member

@Perlkonig Perlkonig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See two minor tweaks. Then repush and we'll move it into dev.


// ------------------------------------------------------------------------------------- //

public move(m: string, {trusted = false} = {}): PluralityGame {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will want to look for the partial flag and return early when partial (check after moves are processed and before scores are recalculated). See Wunchunk as an example. This is important for any game that has multiple steps or pieces moved/placed. This may be why things are not rendering correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It renders now! 🥳

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!

@jpneto jpneto requested a review from Perlkonig February 5, 2026 22:18
Copy link
Member

@Perlkonig Perlkonig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Further changes will likely happen once you're able to test it live.

@Perlkonig Perlkonig merged commit deed837 into AbstractPlay:develop Feb 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants