Bug 434499

Summary: Hint suggests invalid looking move
Product: [Applications] kpat Reporter: Simon Quigley <squigley>
Component: generalAssignee: Stephan Kulow <coolo>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: aacid, kde-games-bugs-null
Priority: NOR    
Version First Reported In: 19.12   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: hint
old behaviour

Description Simon Quigley 2021-03-16 15:27:24 UTC
Created attachment 136738 [details]
hint

SUMMARY

Simple Simon game suggests (hint) and appears to allow invalid moves, eg moving mismatched suit card stacks between piles.

It looks like this is actually caused by condensing 2 separate valid moves into one, which makes it appear that you can make invalid moves.

STEPS TO REPRODUCE
1. Open, new game, Simple Simon
2. play until there is an empty column
3. use hint function, and it will show moves involving 2 different suit types stacked being able to be moved.

OBSERVED RESULT

Shows and allows moves which appear invalid.

EXPECTED RESULT
The first of the 2 valid moves would be suggested, rather than a move which can't be made until that first (unshown) move is made.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

ADDITIONAL INFORMATION

Screenshot attached, showing hinted card highlighted, which shouldn't be valid. To move this card requires moving the mismatches cards from on top of it first.
Comment 1 Albert Astals Cid 2021-03-16 20:03:16 UTC
It's an optimization, it let's you do that because you have an empty slot on the right and it knows you could move the 5/4 there, then move the 7/6 and then move the 5/4 again.

If you put any card on that empty slot it won't let you do the move (nor suggest it)
Comment 2 Simon Quigley 2021-03-16 21:42:23 UTC
Thanks for the reply. I initially thought it was a bug, but in the process of documenting I realised what and why it was doing it, including confirming that it didn't if I filled the empty column.

I just noticed it because I play on 2 different machines, using different distros (Mint/Ubuntu), and they must have different versions packaged on each.

I understand it's an optimisation to condense the 2 moves into a single one, and it makes sense, it's just a slightly annoying difference in behaviour when using different versions simultaneously.

I have attached a screenshot of perhaps the "old" behaviour, where the 5 hearts is movable to the 6 hearts, but I have to do it in 2 steps, which the newer version will suggest/allow/perform :-)

Perhaps a related feature request would be to have a preferences setting to enable or disable optimisations. Or I just need to update my software and run the same version in each place..

Thanks.
Comment 3 Simon Quigley 2021-03-16 21:42:51 UTC
Created attachment 136753 [details]
old behaviour