Minesweeper game: Difference between revisions

Content added Content deleted
m (BASIC256 moved to the BASIC section.)
Line 2,894: Line 2,894:
no_time = 0
no_time = 0
.
.
func getind r c . ind .
proc getind r c . ind .
ind = -1
ind = -1
if r >= 0 and r <= 6 and c >= 0 and c <= 7
if r >= 0 and r <= 6 and c >= 0 and c <= 7
Line 2,900: Line 2,900:
.
.
.
.
func draw_cell ind h . .
proc draw_cell ind h . .
ind -= 1
ind -= 1
r = ind div 8
r = ind div 8
Line 2,935: Line 2,935:
.
.
.
.
func open ind . .
proc open ind . .
if ind <> -1 and cell[ind] = 0
if ind <> -1 and cell[ind] = 0
cell[ind] = 2
cell[ind] = 2
Line 2,956: Line 2,956:
.
.
.
.
func show_mines m . .
proc show_mines m . .
for ind to 56
for ind to 56
if cell[ind] = 1
if cell[ind] = 1
Line 2,967: Line 2,967:
.
.
.
.
func outp col s$ . .
proc outp col s$ . .
move 2.5 87
move 2.5 87
color col
color col
Line 2,975: Line 2,975:
text s$
text s$
.
.
func upd_info . .
proc upd_info . .
for i to 56
for i to 56
nm += flag[i]
nm += flag[i]
Line 2,990: Line 2,990:
.
.
.
.
func test ind . .
proc test ind . .
if cell[ind] < 2 and flag[ind] = 0
if cell[ind] < 2 and flag[ind] = 0
if cell[ind] = 1
if cell[ind] = 1
Line 3,005: Line 3,005:
.
.
background 676
background 676
func start . .
proc start . .
clear
clear
color 353
color 353