Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solver renames puzzle pieces #11

Open
ecm-bitflipper opened this issue Oct 8, 2023 · 0 comments
Open

Solver renames puzzle pieces #11

ecm-bitflipper opened this issue Oct 8, 2023 · 0 comments

Comments

@ecm-bitflipper
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant