Skip to content

Conversation

Garanas
Copy link
Member

@Garanas Garanas commented Sep 18, 2025

Description of the proposed changes

The current code has a flaw and a bug in it:

  • Flaw: the vote does not expire. If you offer it at the start of the game and forget about it then your opponent can 'randomly' draw the game later.
  • Bug: it relies on a user input to determine what army we make the draw offer for. It uses OkayToMessWithArmy to validate the army. This does not work in union mode. In union mode you can technically forfeit for other, allied armies.

We try to fix both issues with these changes. I took the route to refactor it into a separate component. The implementation is quite simple. It's not a huge refactor.

Testing done on the proposed changes

Start a game of 4 players with 2 teams and validate whether the game draws.

Additional context

A few things that we may want to add:

  • A message when the draw offer expired.
  • The 'Draw' button needs to uncheck when the draw offer expires.

Checklist

I suspect this was changed recently. It now matches the init file for development again.
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.

1 participant