aka tGDA

RSS
Aularon

MineSweeper

jsMineSweeper

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/
Infos & Updates:

Overview

[24/09/2008@22:50]
Winning a 5x5 Field

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:

About You
   
   
   
Your 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.

Valid XHTML 1.0 StrictValid CSS level 3!Creative Commons License

toolbox


Colors Combination

Loading Loading.. 0