I made winsweeper, which will move the mine if there is no safe tile left for you to discover.
https://github.com/alaingilbert/winsweeper