mobile icon indicating copy to clipboard operation
mobile copied to clipboard

Over the board feats: Resign, Offer Draw and notification on threefold repetition

Open andy-ife opened this issue 9 months ago • 0 comments

This pr adds three new features to over the board games: resign, offer draw, and a notification on threefold repetition. No new widget or class was added, and these features were implemented much like they are in regular online games.

Fixes #1029

Changes made:

  • OverTheBoardGame model class: Added three new getters: abortable, resignable and drawable. Calculated the same way as in the Game model class.
  • OverTheBoardGameController: Added two new functions: resign() and draw(). Also added a check for a threefold repetition on every move.
  • OverTheBoardScreen: Added a hamburger menu to the UI, added listeners for the new controller functions, and used YesNoDialog to request user confirmations.

Tests performed:

  • Ran flutter test. Some tests failed, but these were not due to any changes I made
  • Ran flutter analyze. No issues
  • Manually tested the new features - debug build on an Android device, API Level 31

https://github.com/user-attachments/assets/b3efe807-5a30-44e8-9e5b-e471c396a985

https://github.com/user-attachments/assets/69c24f2d-922c-4a24-b0f4-dc6b445541b5

https://github.com/user-attachments/assets/70f1c3d2-09cc-48ff-bbe8-909e574b2ec2

andy-ife avatar Mar 20 '25 22:03 andy-ife