Bug 351815 - undoing last human made move may cause AI opponent to move twice
Summary: undoing last human made move may cause AI opponent to move twice
Status: RESOLVED FIXED
Alias: None
Product: kfourinline
Classification: Applications
Component: general (other bugs)
Version First Reported In: 1.40
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-26 17:45 UTC by Martin Walch
Modified: 2022-03-27 21:53 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
video showing the bug in KFourInLine (382.15 KB, video/ogg)
2015-08-26 17:45 UTC, Martin Walch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Walch 2015-08-26 17:45:26 UTC
Created attachment 94229 [details]
video showing the bug in KFourInLine

1. launch kfourinline and start a new game human vs, AI
2. when you make a move, instantly undo it
3. watch AI moving for you and for itself

See the attached screen capture for a demonstration
Comment 1 Justin Zobel 2021-03-09 23:51:04 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 2 Martin Walch 2022-03-21 19:45:28 UTC
(In reply to Justin Zobel from comment #1)
> Thank you for the bug report.
> 
> As this report hasn't seen any changes in 5 years or more, we ask if you can
> please confirm that the issue still persists.
> 
> If this bug is no longer persisting or relevant please change the status to
> resolved.

Still present in 21.08.3.
Comment 3 Bug Janitor Service 2022-03-21 21:34:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/games/kfourinline/-/merge_requests/3
Comment 4 Albert Astals Cid 2022-03-27 21:53:19 UTC
Git commit b2a3b9dd48a2a1f86d7fcb107c535cc8672fb08d by Albert Astals Cid.
Committed on 21/03/2022 at 21:33.
Pushed by aacid into branch 'release/22.04'.

Fix undo sometimes making the AI play on wrong turn

If you undo while it's the AI turn to play it would undo the human move
but the AI still thought it was its turn so the play was put on the
human player

M  +5    -0    src/kwin4.cpp

https://invent.kde.org/games/kfourinline/commit/b2a3b9dd48a2a1f86d7fcb107c535cc8672fb08d