After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721248 - Hint broken if tile without match is selected
Hint broken if tile without match is selected
Status: RESOLVED FIXED
Product: gnome-mahjongg
Classification: Applications
Component: general
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-mahjongg-maint
gnome-mahjongg-maint
Depends on:
Blocks:
 
 
Reported: 2013-12-30 21:17 UTC by Michael Catanzaro
Modified: 2014-01-08 20:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Catanzaro 2013-12-30 21:17:59 UTC
* Select a tile, so that it's highlighted
* Click Hint
* You get no hint, but you do incur the time penalty
Comment 1 Mario Wenzel 2013-12-31 10:32:39 UTC
This actually works pretty much as intended since it blinks if it finds a matching tile for the already selected one.

Only if there is no matching tile, it doesn't blink and it adds the time. There would be several possible fixes:
1. Blink that one tile even if there is no match to indicate exactly that.
2. Don't do anything but don't penalize for time either.
3. Show a message that there was no possible hint for that tile in a different way (and penalize for time or don't)
4. Remove selection and hint for any other possible match, regardless of the selected tile.


For fix 1 we simply add selected_tile = null; as first line in game.vala:set_hint() (as far as I can see, this doesn't break anything).

The other fixes would be a bit more elaborate but nothing too fancy.
Comment 2 Michael Catanzaro 2013-12-31 16:55:18 UTC
Thanks for investigating.

I think I'd prefer 4. I think 1 and 2 would both be confusing.
Comment 3 Mario Wenzel 2014-01-01 13:46:00 UTC
I agree with you and if no one swoops in I guess I will manage to have a fix in master within a week or so. No need for you to bother.

Depending on the size I will also put it into the 3.10 branch if this is alright with you.
Comment 4 Mario Wenzel 2014-01-08 19:58:03 UTC
Alright, that is fixed now in master and 3.10.

Any two tiles that match are flashed if the selected tile has no match, as if no tiles were selected. The selection of the tile remains.
Comment 5 Mario Wenzel 2014-01-08 20:07:53 UTC
And looking at the comments in the code, it was supposed to flash the one single tile without a match.

That the tile didn't flash and a time penalty was still applied, was the "actual bug".