Skip to content
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

Do not wait for idle players #63

Open
4 tasks
peersky opened this issue Aug 23, 2024 · 0 comments
Open
4 tasks

Do not wait for idle players #63

peersky opened this issue Aug 23, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@peersky
Copy link
Member

peersky commented Aug 23, 2024

Currently round ends on timeout or when all players made their turn.

It's quite common for newcomers to drop off the game, hence we would like to modify current logic so that

  • By default when game starts all players are flagged active
  • If player did not made any activity previous round, he is flagged as idle
  • Early turn ending is possible if all active members made their move.
  • If player made a move and playerMove is called, player must be set back to active
  • In LibQuadraticVoting function computeScoresByVPIndex should take in list of whether participant proposed or not (infer from is active or not). If is true, the Gives benefits to everyone but himself action must be bypassed.

Flag can be added to LibTurnBasedGame.sol -> struct GameInstance.

The check for early ending can be added to LibTurnBasedGame -> struct canEndTurnEarly

Write additional tests:

test/RankifyInstance.ts:

When first turn was made:

  • Does not wait for a participant who did not made a move in previous turn

When second turn was made:

  • Waits for participant who was idle and made a move in last finalised turn
  • Idle participant did not give points during end turn score calculation
  • Idle participant who became active gives a proper scores
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant