15 puzzle solver: Difference between revisions

Line 4,656:
def key = table.mkString(",")
def travelled() = parent.length
// Find children/neighbourneighbours, thatflatten iseliminates notthe himself.empty boundaries
def children: List[Board] = List(this.up(), this.down(), this.right(), this.left()).flatten
// Map number to positions
Anonymous user