Documente online.
Zona de administrare documente. Fisierele tale
Am uitat parola x Creaza cont nou
 HomeExploreaza
upload
Upload




MINEHELP.EXE

software


MINEHELP.EXE

============

MineHelp is a little nonsense program which assists you with the Minesweeper

game included in Windows 3.1. It is able to solve the simple parts of the

puzzle, leaving only the really challenging ones to you.

This program is free, no warranties of course. It should always be

distributed as a package containing MINEHELP.EXE, MINEHELP.PAS (TPW source



code), MINEHELP.RES (resource file) and MINEHELP.DOC (this document).

Description

===========

You can start MineHelp at any time. When Minesweeper is not active, MineHelp

just sits and waits; as soon as Minesweeper is started, MineHelp begins to

analyze the game situation.

When started, MineHelp displays a little dialog box:

Status:

-------

Inactive: MineHelp doesn't do anything.

Active: When you press the OK button, MineHelp will do one step towards

the solution of the puzzle, according to the "Level" settings.

If it doesn't find a move, it does nothing, and it is up to

you to figure out the next step.

Automatic: MineHelp continuously monitors the mine field and does what it

can do to solve the puzzle. It will only stop when there is no

obvious thing to do (and "Level" is not set to "Random").

Level:

------

Basic: MineHelp will only do the basic tricks: clearing around a square

if there are already enough squares marked as mined, or marking

all covered adjacent squares if their number adds up to the

total number of mines.

Expert: MineHelp will also solve problems which depend on two numbered

squares. Here is a typical situation:

.::, (X means any numbered field)

X21, The ':' region contains one mine at most, but the '2'

XXX, square needs two mines in its neighbourhood. Hence,

'.' is a mine, and the ',' fields are all safe.

Random: If it doesn't find a move using the "basic" and "expert"

strategies, MineHelp will uncover a square at random. This can

go wrong, of course.

Animation: MineHelp will move the mouse cursor around on the mine field

---------- while it simulates mouse clicks.

Remarks: - If "Status" is "Automatic" and "Level" is "Random", MineHelp

======== effectively attempts to solve the puzzle without user interaction.

- These options take effect immediately; there's no need to press

the OK button. The OK button is only for single-step execution

in "active" mode.

Command line arguments

======================

The program parameter is a single string of lowercase (sorry) characters.

c: MineHelp will start iconized

h: MineHelp will start hidden (and probably remain so)

i: initial status will be "inactive"

a: initial status will be "active"

b: initial level will be "basic"

r: initial level will be "random"

n: animation will be on initially.

Defaults: window visible, status automatic, level expert, animation off.

Example: minehelp cab -> Start iconized, status is active, level is basic.

How it works

============

MineHelp analyzes the Minesweeper window by finding its position on the

screen and then examining the contents of the mine field squares. It does

this by reading pixels at strategic locations, using Windows' GetPixel

function.

The program then analyzes the current situation and sends the appropriate

mouse clicks to the Minesweeper window.

In "automatic" mode, MineHelp uses a timer to examine the mine field once

every second.

Limitations

===========

- MineHelp works only when Minesweeper is in color mode.

- MineHelp doesn't do anything if the mine field is not fully visible

on the screen.

- The program relies on the Minesweeper window dimensions and on the

colors and shapes of the bitmaps used for the squares. If this should

change with future Minesweeper versions, MineHelp would stop working.

- MineHelp doesn't make mistakes (hopefully), except in "Random" mode;

however, it always assumes that the marks on the mine field are correct.

- In automatic mode, you cannot safely use the "?" feature, because the

first right mouse click will produce a "mark", which is taken literally

by MineHelp.

- In automatic mode, Minesweeper sometimes loses the "button up" message

from a *user's* mouse click. This leaves the clicked square in a "pushed"

state, which looks like a safe field with no mines around it to MineHelp.

- MineHelp doesn't work with some buggy video drivers. Among those are the

ET4000 "turbo" drivers (MMTL*.DRV), which return incorrect values for the

GetPixel function.

Performance

===========

In automatic/random mode, MineHelp solves Minesweeper's "Expert" mode in

about 20% of all cases.

The time used to solve the puzzle depends of course on the processor

speed, but also on the speed of the video driver. On a Compaq 486/50M

with QVision card, the best score was 5 seconds (usually 7 to 10). On

a 386/20, times are around 50 seconds.

What could be improved

======================

- MineHelp doesn't take into account the number of remaining mines displayed

in the upper left corner of Minesweeper's window. This information is

often useful in the final phases of the game.

- "Random" mode does not have to be completely random; there could be some

basic probability calculations.

- MineHelp cannot solve problems which depend on more than two numbered

squares. These situations are quite rare, but here's a simple one:

XXX The '.' and ',' regions both contain exactly one mine, therefore

.1XX ':' is safe.

.21X

:,,X

History

=======

Version 1.00, April 26, 1992.

Version 1.01, May 8, 1993:

- Small change in the "two fields" strategy

- Correct class name in the dialog resource

- Documentation changes.

Have fun.... Peter Karrer [email protected]

100121,2215


Document Info


Accesari: 881
Apreciat: hand-up

Comenteaza documentul:

Nu esti inregistrat
Trebuie sa fii utilizator inregistrat pentru a putea comenta


Creaza cont nou

A fost util?

Daca documentul a fost util si crezi ca merita
sa adaugi un link catre el la tine in site


in pagina web a site-ului tau.




eCoduri.com - coduri postale, contabile, CAEN sau bancare

Politica de confidentialitate | Termenii si conditii de utilizare




Copyright © Contact (SCRIGROUP Int. 2024 )