Site creation: Example page

Previous page Next page

Example page

The text shown below is the XHTML required to create the Minestein Home page. It has been colour coded to show which segments are written as "content" by the user, and what is generated by the programs.

Text from the page_description file is shown in this colour.

Text from the user written content files is shown in this colour.

Text generated by the programs make_pages and make_menu is shown in this colour.

Notice that the majority of the code is generated by the programs or extracted from the page description files. This, combined with the use of CSS, means that the XHTML knowledge required by the user is quite small.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=us-ascii" />
<link rel="stylesheet" rev="stylesheet" href="sourgumdrop.org.uk.css" type="text/css" media="all"/>
<!-- head_1 ends -->

<title>
Minestein: a Minesweeper game with logically solvable puzzles
- no guessing is required
</title>
<meta name="description" content="

Minestein: a Minesweeper game with puzzles that can be solved by logic - no guessing is needed.
Puzzles can have a minimum difficulty. The Python source code is included in the download.
"/>
<meta name="keywords" content=" 
3bv, difficulty rating, download, 
hint system, logical, mines, minestein,
minesweeper, no guessing, program, puzzle, python, 
solution, source code
"/>
<!-- head_2 starts -->
</head>
<body>

<div id="container"> <!-- START OF CONTAINER WHICH WRAPS IT ALL UP (INSIDE BORDER) -->


<div class="headerbar">
<div class="headerbar_left">
<script type="text/javascript">
<!--//<![CDATA[

var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August",
"September","October","November","December")
document.write("<h2>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+"</h2>")

//]]>-->
</script>
<noscript>
<b>Welcome noscript</b>
</noscript>
</div>
<div class="headerbar_right">

<!-- end of head_2 -->

<h2>

Minestein Home

</h2>

<!-- head_3 starts -->

</div> 
</div> 

<div id="header"> <!-- START OF header -->
<div class="header_left"> 


<img src="./images/sg_game_source_pink.png
" alt="SourGumdrop Game Source
" title="SourGumdrop logo"/></div> 

<div class="header_right"> 

<!-- head_3 ends -->
<img src="

./images/minestein.png

" alt="


Minestein logo


" title="

Minestein logo

" align="top"/>
<!-- start of head_4 -->

</div> 
</div> 

<!-- END OF headers -->

<div id="mainnav">
<div class="mainnav_left">
<div id="pmenu_container">                                                             
<ul id="pmenu">    

<!-- end of head_4 -->
<li class="drop"><a href="index.html">Home
<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="index.html#news">News</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->

</li>
<li class="drop"><a href="games.html">Games
<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="index_1.html" class="enclose">Sudoku</a></li>
<li><a href="k_index.html">Kakuro</a></li>
<li><a href="sourkoban_1.html">Sokoban</a></li>
<li><a href="minestein_1.html">Minesweeper</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->

</li>
<li><a href="all_downloads.html">Downloads</a></li>
<li class="drop"><a href="coding.html">Coding
<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li class="fly"><a href="sudoku_code.html">Sudoku
<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="sudoku_classes.html" class="enclose">Classes</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->

</li>
<li class="fly"><a href="kakuro_code.html">Kakuro
<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="kakuro_classes.html">Classes</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->

</li>
<li><a href="sokoban_classes.html">Sokoban</a></li>
<li><a href="minesweeper_classes.html">Minesweeper</a></li>
<li><a href="webpages.html">Webpages</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->

</li>
<li class="drop"><a href="contacts.html">About/Contact
<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="contacts.html#stupid_name" class="enclose">Stupid name</a></li>
<li><a href="contacts.html#acknowledgements">Thanks</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<!-- start of search_box -->

</ul>
</div>

</div> <!-- end of mainnav_left -->

<div class="mainnav_right">

<form method="get" action="http://www.google.com/search">
<div style="border:0px solid #d4cfbb;margin:1px;font-size:75%;">
<input type="text" name="q" size="10" maxlength="255" value="" />
<input type="hidden" name="sitesearch" value="sourgumdrop.org.uk" />
<input type="submit"  value="Go" />
</div>
</form>

</div> <!-- end of mainnav_right -->

</div> <!-- end of mainnav -->
<div style="clear:both;"></div>


<!-- end of search_box -->
<div id="subnavbar">
<div id="qmenu_container">
<ul id="qmenu">
<li class="drop"><a href="minestein_1.html">Introduction
<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="minestein_1.html#overview" class="enclose">Overview</a></li>
<li><a href="minestein_1.html#what_is_minesweeper">Minesweeper?</a></li>
<li><a href="minestein_1.html#news">News</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->

</li>
<li class="drop"><a href="minestein_2.html">Hints
<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="minestein_2.html#hint_algorithms" class="enclose">Algorithms</a></li>
<li><a href="minestein_2.html#hint_alg_1">Algorithm 1</a></li>
<li><a href="minestein_2.html#hint_alg_2">Algorithm 2</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->

</li>
<li class="drop"><a href="minestein_3.html">Options
<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="minestein_3.html#logical_puzzles" class="enclose">Logical puzzles</a></li>
<li><a href="minestein_3.html#algorithm_choice">Algorithm choice</a></li>
<li><a href="minestein_3.html#grid_size"">class="enclose Grid size</a></li>
<li><a href="minestein_3.html#mine_count">Mine count</a></li>
<li><a href="minestein_3.html#minimum_3bv">Minimum 3BV</a></li>
<li><a href="minestein_3.html#generating_time">Generating time</a></li>
<li><a href="minestein_3.html#random_seed">Standard puzzles</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->

</li>
<li class="drop"><a href="minestein_4.html">Controls
<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="minestein_4.html#exposing_a_mine">Exposing a mine</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->

</li>
<li class="drop"><a href="minestein_7.html">Game statistics
<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="minestein_7.html#results_file">Results file</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->

</li>
<li class="drop"><a href="minestein_5.html">Example game
<!--[if IE 7]><!--></a><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li><a href="minestein_6.html">Example game 2</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<!-- start of menu_tail -->

</ul>
</div>
</div> <!-- END OF  -->

<!-- end of menu_tail -->
<div class="leftpanel">
<div class="contentbox">
<div class="headerbar">
<a name="introduction"></a>
<h2>Introduction</h2>
</div>

<p>

Minestein is a version of the famous
<a href="http://en.wikipedia.org/wiki/Minesweeper_(computer_game)"> 
Minesweeper game.</a> 
But, unlike the original Minesweeper, in its default mode Minestein
will always produce puzzles that can be solved using logic - <b>no
guessing is required.</b> For traditionalists, Minestein also has an
"Original" mode which is equivalent to the standard program. If users
get stuck or are still learning, Minestein has a button providing a two
stage hint mechanism, plus "show answer" and "show solution"
buttons. It can produce puzzles with a minimum difficulty rating. The
Python source code is included in the download.

</p>

<a name="overview"></a>
<h3>Overview</h3>

<p>
Figure 1 shows a typical view of Minestein soon after a puzzle has
been started. The figure legend gives an overview of the game play.
</p>


<img border="1" src="./images/start_2.png"  alt="SourGumdrop: version 0.5 example "/>
<div class="fig_leg">

Figure 1. The smileys are buttons and, other than the first, which
starts a new game, their faces have been chosen to indicate increasing
levels of desperation: the second gives a clue; the next reveals the
answer for a single cell; the next reveals the solution for the whole
grid. The three sets of figures give the number of remaining mines,
<a href="http://en.wikipedia.org/wiki/Minesweeper_(computer_game)#Measuring_board_difficulty"> 
the 3BV score,</a> and the time taken.  When this puzzle was started
it contained 20 hidden mines, five of which have since been flagged by
the user.  The user reveals a cell by clicking on it with the left
mouse button.  If a mine is revealed the game finishes in failure. If
the cell is touching mine(s) their count is revealed. If the revealed
cell has a zero mine count the program automatically reveals all
connected cells with zero counts plus the counts for all surrounding
cells.  The game finishes successfully when all mines have been
correctly flagged or all unmined cells are revealed.

</div>

<br class="clearboth"></br>
<br></br>
</div>
</div>
<div class="rightpanel">
<div class="contentbox">


<div class="headerbar">
<a name="what_is_minesweeper"></a>
<h3>What is Minesweeper?</h3>
</div>

<p>

For those that don't know, the aim of the game is to find the location
of all the mines hidden in a grid. To start the game the user left
clicks anywhere on the grid. This reveals the content of a few cells
around that position. Content is either a mine or a count of the
number of mines that touch the cell, zero being shown as a blank
cell. Apart from those at the edge of the grid, each cell touches 8
other cells (up, down, left, right and four diagonals).  The user left
clicks, in turn, on the cells that he believes to be unmined. This
left clicking reveals the contents of the cell. If the cell is unmined
the touching mine count is shown. If the cell is mined the game is
over and the user has failed.  Success comes when all the unmined
cells are revealed.  Optionally the user can mark the cells that are
thought to be mined. This is done using a right click and places a
flag in the cell without revealing its contents.

</p>
<p>

As mentioned above, an important characteristic of Minestein, and one
which separates it from the original Minesweeper, is that it produces
puzzles that can be solved logically. To many this will be seen as a
great advantage. If they get stumped users can resort to a hint
system.

</p>

<div class="headerbar">
<a name="news"></a>
<h2>News</h2>
</div>

<b>December 8th 2008</b>
<p>
Version 0.03 released:
<a href="minestein_3.html#built-in"> 
Expert mode logical puzzle creation time greatly reduced: it now takes 1/260 
of the original time!</a>
</p>

<b>December 1st 2008</b>
<p>
Version 0.02 released: halved the time taken to generate puzzles that can be 
solved by logic - though it is still too slow for large grids with many mines.
</p>


</div>
</div>

<!-- start of tail_1 -->

<div style="clear:both;"></div>
<div id="footer"></div>
<div class="footerbar">
<!-- end of tail_1 -->

<a href="http://delicious.com/post?url=
http://sourgumdrop.org.uk/minestein_1.html&title=


Minestein Home


"><img border="0" src="./images/delicious-16x16.png" alt="Delicious"/>delicious.com</a>
<a href="http://digg.com/submit?url=
http://sourgumdrop.org.uk/minestein_1.html&title=


Minestein Home


"><img border="0" src="./images/digg-16x16.png" alt="Digg"/>digg.com</a>
<a href="http://reddit.com/submit?url=
http://sourgumdrop.org.uk/minestein_1.html&title=

Minestein Home


"><img border="0" src="./images/Reddit-16x16.png" alt="Reddit"/>reddit.com</a>
<a href="http://facebook.com/sharer.php?u=
http://sourgumdrop.org.uk/minestein_1.html&title=

Minestein Home

"><img border="0" src="./images/FaceBook-16x16.png" alt="Facebook"/>facebook.com</a>
<a href="http://stumbleupon.com/submit?url=
http://sourgumdrop.org.uk/minestein_1.html&title=

Minestein Home


"><img border="0" src="./images/Stumbleupon-16x16.png" alt="Stumbleupon"/>stumbleupon.com</a>
<!-- start of tail_2 -->

    <a href="http://validator.w3.org/check?uri=referer"><img
        src="http://www.w3.org/Icons/valid-xhtml10-blue"
        alt="Valid XHTML 1.0 Transitional" height="31" width="88"
	border="0" /></a>

        <a href="http://jigsaw.w3.org/css-validator?uri=http://sourgumdrop.org.uk/sourgumdrop.org.uk.css">
    <img style="border:0;width:88px;height:31px"
        src="http://jigsaw.w3.org/css-validator/images/vcss-blue"
        alt="Valid CSS!" /></a>


</div> 
</div> 

</body>
</html>

<!-- end of tail_2 -->

Last updated: 2012-10-28    Sitemap