aka tGDA
MineSweeper
A Javascript based MineSweeper game, start up, define the height and width, how many mines do you want in the field.. and start playing..
http://tgda.freehostia.com/gadgets/MineSweeper/Overview
The main idea behind this, when user chooses to start a new game, the minefield, a bi-dimensional array is populated in memory, then rendered on screen as buttons, whenever any button is clicked, we check if the corresponding array element contains a mine or not, if not, we try to count how many mines are there around, if there's at least one, we tell that as the button label, if there's no mines at all, we reveal this and the 8 places around it recursively.
No Comments YET :|
Add Comment:
This blog is meant to provide a high quality articles and tutorials for advanced computer concepts, or basic ones that are hard to understand, But that would be mostly in Arabic. The blog is on beta version now, please come back soon for the good stuff.
This work by Aularon is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.




Loading..