MCPcopy Index your code
hub / github.com/geekcomputers/Python / is_goal

Method is_goal

8_puzzle.py:43–45  ·  view source on GitHub ↗

Check if current state matches goal.

(self)

Source from the content-addressed store, hash-verified

41
42
43 def is_goal(self) -> bool:
44 """Check if current state matches goal."""
45 return self.board == self.goal
46
47 def neighbors(self) -> List["PuzzleState"]:
48 """Generate all valid neighboring states by moving empty tile (0)."""

Callers 1

solve_puzzleFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected