Get a new puzzle by making random slides from a solved state.
(moves=200)
| 125 | |
| 126 | |
| 127 | def getNewPuzzle(moves=200): |
| 128 | """Get a new puzzle by making random slides from a solved state.""" |
| 129 | board = getNewBoard() |
| 130 | |
| 131 | for i in range(moves): |
| 132 | makeRandomMove(board) |
| 133 | return board |
| 134 | |
| 135 | |
| 136 | # If this program was run (instead of imported), run the game: |
no test coverage detected