This is the last merge request to fix bugs 407244 and 380462. In merge request !4 (merged) i said, there would be two more patches coming, but I decided to put both into a single merge request. Otherwise, either the first would have been incomplete (several warnings in test suite remaining) or the second merge request would have been tiny. If I should rather split this merge request into smaller pieces, please let me know.
The merge request finalizes the bug fix. After this commit is merged, when a game is over:
- The last piece is moved to the correct location.
- The piece is moved instantaneously.
- The new piece which could no longer be placed, causing the game to be lost, is also drawn.
It should look like this:
Additional work is done to add tests. This required some minor refactoring.
I have also tested this manually:
- Playing several single-player games, switching difficulty and themes.
- Playing against the AI - winning and losing games.