Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1585

Python • Re: Having trouble to see it.

$
0
0
:o
Sorry for the late reply. Had some RL issues. :(

I pretty much understood some of it, but when it comes to the class iterator, my brain melts. That part I don't understand.
I do have at small update. If I want to:
- increase tile to 36 on a 6 x 6 grid
- have 1 tile placed on a specific field on the grid: C4 and that tile will be #20 and that will be the starting point.
- for every correct edge place correct a counter has to be increase. If that counter is 60 then the puzzle is solved correctly.
- save the solution every time edge counter is bigger than the other. Also some kind of a backup if the power should be turned off then when the application starts again it could continue.

How could that be done?

36 tiles

Code:

pieces.append(piece("0","0","7","1"))pieces.append(piece("0","8","3","5"))pieces.append(piece("0","3","7","8"))pieces.append(piece("1","0","2","1"))pieces.append(piece("10","2","10","8"))pieces.append(piece("5","10","2","3"))pieces.append(piece("5","5","5","2"))pieces.append(piece("8","2","1","1"))pieces.append(piece("4","10","3","4"))pieces.append(piece("2","1","9","9"))pieces.append(piece("1","0","6","3"))pieces.append(piece("0","7","1","2"))pieces.append(piece("3","7","6","8"))pieces.append(piece("1","6","6","5"))pieces.append(piece("5","6","0","0"))pieces.append(piece("9","6","8","7"))pieces.append(piece("3","0","3","4"))pieces.append(piece("4","6","0","5"))pieces.append(piece("4","3","6","5"))pieces.append(piece("8","6","4","9")) #20pieces.append(piece("5","4","4","4"))pieces.append(piece("7","4","7","10"))pieces.append(piece("8","6","7","4"))pieces.append(piece("4","0","5","1"))pieces.append(piece("0","7","8","10"))pieces.append(piece("9","5","10","3"))pieces.append(piece("10","3","6","5"))pieces.append(piece("1","0","10","0"))pieces.append(piece("2","10","9","0"))pieces.append(piece("4","8","7","0"))pieces.append(piece("3","9","8","0"))pieces.append(piece("5","7","6","0"))pieces.append(piece("3","7","0","4"))pieces.append(piece("1","9","0","2"))pieces.append(piece("0","10","0","1"))pieces.append(piece("2","8","0","3"))

Statistics: Posted by valnurat — Mon Jan 15, 2024 2:38 pm



Viewing all articles
Browse latest Browse all 1585

Trending Articles