OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [services/] [gfx/] [mw/] [v2_0/] [src/] [demos/] [nanox/] [landmine.doc] - Blame information for rev 365

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
                        LANDMINE
2
 
3
 
4
Landmine is a game in which you try to safely move step by step from the
5
top left corner of a square board to the bottom right corner of the board.
6
Scattered among the cells of the board are invisible mines which blow up
7
if you step on them.  When you step on a mine, one of your legs is blown
8
off, and if you lose both legs, then the game is over.
9
 
10
Steps are made one at a time from any cell you have already visited to
11
any of the eight possible cells which are adjacent to it.  At the start
12
of the game you are placed in the top left corner of the board, which is
13
guaranteed to have no mine in it.  There are also no mines immediately
14
adjacent to the starting cell.  There is also a guaranteed path from the
15
starting cell to the finishing cell which does not encounter any mines.
16
 
17
You cannot see the mines, however you have a detector which indicates
18
the presence of the mines.  The detector cannot locate the direction of
19
any individual mine, but it does indicate the number of mines immediately
20
adjacent to your cell.  By using this information from all the cells you
21
have already visited, you can usually deduce where the mines must be.
22
In this way, you can find your way safely to the destination cell.  Some
23
of the deductions that can be made are very subtle, and experience will
24
improve your scores dramatically.
25
 
26
When landmine is started up under mini-X, the board is displayed at the
27
left side, some buttons are displayed at the upper right, and some statistics
28
are displayed at the lower right.  To make a step, use the mouse to move the
29
cursor onto the cell that you wish to step on, and press a button.  A number
30
will appear in that square (if there is no mine there!) indicating now many
31
mines are adjacent to that square.  You can step onto any cell which is
32
adjacent to any cell you have already stepped on.
33
 
34
In order to help you deduce where the mines are and what steps are safe,
35
you can mark any non-visited cell as containing a mine.  To do this, move
36
the mouse to that cell, and then type a space.  A red circle will then
37
appear in that cell to indicate that you think it contains a mine.  A
38
side effect of doing this is that you cannot accidentally step on the
39
square while it is marked.  Notice that the cell is marked as you request
40
whether or not a mine is actually there, thus if you mistakenly mark a
41
cell, you are likely to get confused and later step on a real mine!  If
42
you think that a cell is marked in error, you can clear the marking by
43
moving the mouse to the cell and then typing another space.
44
 
45
If you step on a mine, you will hear a beep, and a red circle will flash
46
on and off for a few seconds to indicate that the mine has exploded.
47
Then the mine will be removed, and the counts in the adjacent cells
48
will be adjusted to reflect the new situation with one less mine.  Your
49
number of legs is also reduced by 1, and the cursor shape is changed to
50
indicate this.  If you lose both legs, then the game is lost.  If you
51
successfully make it to the lower right corner, then the game is won.
52
 
53
When the game is over, the location of all mines are marked with red circles.
54
In addition, if you had marked cells as containing mines, but the cells were
55
wrongly marked, then those cells are shown with green circles.  After you
56
have analyzed the results of the game, you can start a new game by using
57
the NEW GAME button.
58
 
59
The three buttons on the top right of the screen are QUIT, SAVE GAME,
60
and NEW GAME.  The buttons are activated by moving the cursor to the
61
interior of the button, and pressing any mouse button.  No confirmation
62
is asked for these actions.
63
 
64
QUIT will immediately quit playing and return you to text mode and exit.
65
However, if you had started landmine with a filename to restore from,
66
then the current status will be saved back to that file.  If you had not
67
supplied a filename on starting, and have not saved the game using the
68
SAVE GAME button, then QUIT will quit without saving anything.
69
 
70
SAVE GAME is used to save the current status of the game without exiting.
71
This lets you make sure that the game is saved away when you have been
72
playing for a long time and are worried about crashes.  If you had given
73
a file for restoring of previous games, then the game will be saved back
74
into that file.  If you had not specified a filename, then a default name
75
of "landmine.save" will be used.  If the save operation works, the button
76
will momentarily flash.  If the save operation fails, then a beep will
77
be sounded.
78
 
79
NEW GAME is used to start a new game.  This button can only be used after
80
a game has just been completed.  That is, after both legs have been blown
81
off or you have reached the destination cell, you use this button to
82
begin another game.
83
 
84
When starting landmine, you can specify some options on the command line.
85
The options are the following:
86
 
87
        landmine [-s n] [-m n] [savefile]
88
 
89
The savefile is the filename to save the game into when the SAVE GAME or
90
QUIT buttons are used, as described above.
91
 
92
The -s option sets the size of the board.  The size is the number of cells
93
across the board, and also down the board.  The board size can be set to
94
any size from 3 to 30.  The default size is 15.
95
 
96
The -m option sets the number of mines on the board.  This can be set from
97
1 to 50% of the number of cells on the board.  The default number of mines
98
is 15% of the number of cells on the board.  For the default board size,
99
the default number of mines is 33.
100
 
101
The statistics saved in the save file are kept for each combination of
102
board size and mines, thus you can play with many different combinations
103
of values and the statistics will be kept separately.  There is a limit
104
of 1000 different combinations that can be saved.
105
 
106
You cannot change the board size or number of mines while a game is in
107
progress.  To change the parameters, finish the game, save the game into a
108
file and exit, then restart landmine giving the new parameters.

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.