rush icon indicating copy to clipboard operation
rush copied to clipboard

Solver renames puzzle pieces

Open ecm-bitflipper opened this issue 2 years ago • 0 comments

This isn't an issue that I expect the author to fix, more just information for other Rush Hour'ers.

If you run the go code to solve a board, the solver renames the pieces. They are no longer left-right/top-bottom after the solver does its thing. However, if you go here:

https://go.dev/play/

And paste in this code:

package main
import (
	"fmt"
	"log"
	"github.com/fogleman/rush"
)
func main() {
	board, err := rush.NewBoardFromString("IBBxooIooLDDJAALooJoKEEMFFKooMGGHHHM")
	if err != nil {
		log.Fatal(err)
	}
	solution := board.Solve()
	fmt.Println(solution)
	fmt.Println(board)
}

Replacing that board layout with whatever puzzle layout you want the solution for, it will print out not only the solution but the revised puzzle map. Maybe someone will find this helpful.

Close me as not a bug, just a known quirk.

ecm-bitflipper avatar Oct 08 '23 02:10 ecm-bitflipper