DavidNHill / JSMinesweeper

Minesweeper player, solver and analyser in javascript
https://davidnhill.github.io/JSMinesweeper/
MIT License
95 stars 19 forks source link

Question About Extracting Solver Script #12

Closed Krobys closed 2 months ago

Krobys commented 4 months ago

The algorithm and overall functionality work wonderfully. However, I need the solver script to be separate from the visual code. I want to work on automation using my own board and different technologies. How can I extract the solver script so I can input my board and get the optimal moves and mines as output in pure JavaScript? Do you have any plans to write a standalone solver algorithm without the visual component?

DavidNHill commented 4 months ago

take a look at https://github.com/DavidNHill/mspe.node which is a node.js implementation. Readme https://github.com/DavidNHill/mspe.node/blob/master/mspe.node/README.md

It will be easier to get the solver code from here, it is older than the web version but doesn't require any work on my part.

The node.js part is only a wrapper so the solver should be easy to lift.

I'm happy to answer questions when you have some.

Krobys commented 4 months ago

take a look at https://github.com/DavidNHill/mspe.node which is a node.js implementation. Readme https://github.com/DavidNHill/mspe.node/blob/master/mspe.node/README.md

It will be easier to get the solver code from here, it is older than the web version but doesn't require any work on my part.

The node.js part is only a wrapper so the solver should be easy to lift.

I'm happy to answer questions when you have some.

Thank you so much! You are legend🫢