

So make a routine that takes the board state and prints it out.

To keep things simple youll probably want to make a simple console program. Minesweeper.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY without.
For debugging youll almost certainly want to be able to view the state of the board. Minesweeper.js is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. I have implemented the member functions as follows (following the 1 function per file idiom, using internal headers ): // minesweeper.ih includeI’ve used SQL Server Management Studio 2008 Express, but other versions should work as well (although the layout of the resultgrid might require some work). Ideally parameterize it so that you can create a minefield of any given dimensions with any number of mines. But first, for anyone who doesn’t know what minesweeper is, a description is available here. I think it worked out quite nicely, so I’d like to share it with the world. * As a fun exercise I decided to program Minesweeper in T-SQL. Whatever happened to the idea that programming in TSQL can be fun? A Simple-Talk reader contributes an article to remind us all that there is more to TSQL than wrestling with DMVs and pummelling recalcitrant correlated subqueries.
