45
Valentin Bryukhanov
http://bryukh.com/
Last seen 2 years ago
Member for 11 years, 7 months, 16 days
Difficulty Normal
Developer, engineer and taskMaker.
It's not DRY (Don't Repeat Yorself). You can merge four block for moving in one loop or function. And "return" without anything is not good -- it's little confuse.
Good comments.
More
Hard to read long lines.
For unsolvable puzzle, you can check solvability (count inversions).
More
+ for percolate algorithm. But lines 20-39 can be shorten in function. Don't repeat yourself (DRY).
More
First comment you can make as docstring.
The comments are good -- very readable and simple.
Dictionary comprehension is nice.
More