010101100011100001010000010001010000010000101101000001011011111101010100001

A n d r e w     A d a m s

TATTGCGGATAAGGGCGTGTCGTCGCCATGTTACAAAGCGACCTACTCTGCGCGATGGAAACAGTAGCTGTCTGC
[[fetch]] files = ["./algPuzzleSolverScript.py"] from algPuzzleSolverScript import * from pyscript import window import js def new_puzzle(): global thisPuzz thisPuzz = scramble(create_puzzle(4,4)) #Element("newPuzzArr").write(thisPuzz) puzz_element = window.document.getElementById("newPuzzArr") puzz_element.innerHTML = thisPuzz def solve(alg): if alg == "DFS": solved = depth_first(thisPuzz) elif alg == "BFS": solved = breadth_first(thisPuzz) elif alg == "A-star": solved = a_star(thisPuzz) #Element("solvedPuzzArr").write(solved) solved_element = window.document.getElementById("solvedPuzzArr") solved_element.innerHTML = solved # Create initial puzzle new_puzzle() # Expose pyscript functions to JS window js.window.new_puzzle = new_puzzle js.window.solve = solve
Loading puzzle...