lovegraphs
|
10 years ago
|
on: Show HN: Space Invaders built with React
Same on Chrome 45.0.2454.101, Ubuntu 14.04
lovegraphs
|
10 years ago
|
on: Maze Generator and Solver
Thank you, sorry about that. I changed some references around and caught that error only after having deployed.
lovegraphs
|
10 years ago
|
on: Maze Generator and Solver
By the way, thank you for your colorful simile--it really spurred me to fix this issue this morning, and I've definitely learned to take cross-browser compatibility more seriously. Cheers.
lovegraphs
|
10 years ago
|
on: Maze Generator and Solver
Safari is fixed! I need to get a Macbook so testing is faster than waiting for a screenshot online...
lovegraphs
|
10 years ago
|
on: Maze Generator and Solver
Hey Vishal, thanks! Small world!
lovegraphs
|
10 years ago
|
on: Maze Generator and Solver
Thanks! It now works on iOS. Still working on Safari...
lovegraphs
|
10 years ago
|
on: Maze Generator and Solver
Thanks! Pull request merged.
lovegraphs
|
10 years ago
|
on: Maze Generator and Solver
Thanks! Removed.
lovegraphs
|
10 years ago
|
on: Maze Generator and Solver
Lamentable. Must be some missing cross-browser CSS.. I'll look into it tomorrow! In the meanwhile try it in Chrome if you have a chance :)
lovegraphs
|
10 years ago
|
on: Maze Generator and Solver
The particular generation algorithm that you see is called "Randomized Prim's algorithm" on Wikipedia. It starts at a random cell in a grid, marks it as discovered, and adds all of that cell's adjacent walls to a queue. It then selects a random wall from the queue and, if the cell on the other side of the wall has not yet been discovered, opens up that wall. It adds all of the adjacent cell's walls to the queue, marks the adjacent cell as discovered, and selects the next random wall in the queue until all the cells have been discovered. It's kind of a modified BFS. This algorithm guarantees that all cells are connected.
lovegraphs
|
10 years ago
|
on: Maze Generator and Solver
That's right, it does a breadth-first-search from the end-point immediately upon clicking the end-point; it then traces the path from the start-point, following the parent-pointers set during the BFS, painting the DOM in the process.
lovegraphs
|
10 years ago
|
on: Maze Generator and Solver
Thanks!