Skip to content

Solver renames puzzle pieces #11

Description

@ecm-bitflipper

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions