-
Notifications
You must be signed in to change notification settings - Fork 715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't force endTurn
on early moves, with moveLimit
> 1
#934
Comments
Hi! The Lines 478 to 481 in b832b07
I’ve sometimes wondered whether For your use case, I would currently suggest not setting
|
Noted, thanks 👍 I haven't found anything that clearly defines what is exposed in |
I don’t think The most detailed source would probably be the Typescript interface although this doesn’t provide additional context or explanations. Lines 51 to 80 in c7f0fba
There’s a loose convention that fields prefixed with For a better insight into what’s in |
Very helpful, thank you 👍
I would support either of these solutions - the latter does seem more flexible. I'm not particularly strong on the JS/TS front, otherwise I'd immediately volunteer to do it, but perhaps I'll investigate it once I'm a bit more comfortable with the framework. |
A note here to say that in the short-term, we should stop blocking Later we could explore renaming |
As this was tagged "good first issue" I used this as an opportunity to get to know the codebase. The actual fix for the issue would have been really small (removing just one check and updating test), so I went a step further and tried adding the proposed |
To reproduce, create a game with this in its declaration:
And then in a move, fire the endTurn event with the
force
argument:If you take this move as your first action, it just prints a debug message saying eg
INFO: cannot end turn before making 2 moves
. I'm not sure ifforce
isn't properly propagating through the event, as inflows.ts
it does seem to have logic to allow forcing the turn to end early.For context, I'm trying to build a game where players have two actions by default, but one of those actions should immediately end the turn if taken first.
The text was updated successfully, but these errors were encountered: