Re: [gDesklets] 15 pieces puzzle: finding solvable puzzles
- From: Bjoern Koch <H Humpel gmx de>
- To: gdesklets-list gnome org
- Cc: David Zimmerman <zimmerman ds gmail com>
- Subject: Re: [gDesklets] 15 pieces puzzle: finding solvable puzzles
- Date: Sun, 14 Feb 2010 18:42:59 +0100
Hi there,
I have just put a testing version of the 15 pieces desklet to the
desklets-basic branch on launchpad.
Please feel free to play around a bit and see if the parity of the sum
of "the number of inversions" and "the row of the empty tile" can be
used to determine if a puzzle can actually be solved (even) or not
(odd). So far it looks pretty promissing (IMHO).
There are still a lot of print outs to the log for further investigation
that have been commented out but this should make it easier for anybody
to take a closer look at the things going on ;).
And I wouldn't include the status label on top of the puzzle (showing
even/odd etc.) in the released desklet either.
Anyway, the code needs to be cleaned etc. , too.
Furthermore there needs to be a way to deal with unsolvable puzzles ;).
I am thinking of letting the user have a chance to decide on his/her own:
- either re-shuffle (randomize) until we have an "even" puzzle
- change one (or the first) inversion (this should work if the tiles are
next to each other).
Any ideas, comments etc. ?
Greetings, Bjoern
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]