This is a 15 Puzzle simulator made for speedsliding. Press space to scramble it, or use the button. Press the color theme button to change between Fringe and LBL color schemes. After switching color schemes you need to press scramble twice. Speedsliding is a pretty obscure hobby similar to speedcubing. It is where people solve sliding puzzles like this one as fast as possible, usually on a computer. Instead of clicking on tiles to move them, you only need to hover your mouse over the tile you want to move. This makes it a lot faster once you get the hang of it. This simulator also shows a list of all your times, your current average of 5 (Ao5), and the average of all your solves (AoS). My best time is 9.58 seconds!
This project was WAY harder to make than I thought it would be. It took a lot of work and ended up being some of the most complicated code I have ever written. The smartest part in my opinion was how the project identifies whether or not the puzzle is able to be solved. The way I generated scrambles was just by putting random tiles in each position. When you do this, there is a 50% chance the puzzle will not be solvable. The way I fixed this was by using a technique used to solve a Rubik's cube blindfolded. I wrote a script that traces all the pieces one by one, putting each where it needs to go and keeping track of them in a list. Part of the script helps escape a loop if it is in one, and part of it detects when all the pieces have been traced into their correct slot. Then, if the amount of swaps required to solve it is even, it will be solvable. If it is odd, it isn't. This is how cubers can tell if they will get parity in 3bld. Troubles arose when I randomized the position of the blank space as well, but in the end I figured it out and the puzzle will now ALWAYS be solvable. Thanks for reading! Enjoy the project!