Handbook
Glossary
cell-image-path ( cell won? lost? -- image-path )
Vocabulary
minesweeper
Inputs
cell
an
object
won?
an
object
lost?
an
object
Outputs
image-path
an
object
Definition
USING:
accessors
combinators
kernel
math.parser
sequences
;
IN:
minesweeper
::
cell-image-path
( cell won? lost? -- image-path )
won? lost?
or
cell
mined?>>
and
[
cell
state>>
{
{
+flagged+
[
"flagged.gif"
]
}
{
+clicked+
[
"mineclicked.gif"
]
}
[
drop
won?
"flagged.gif"
"mine.gif"
?
]
}
case
]
[
cell
state>>
{
{
+question+
[
"question.gif"
]
}
{
+flagged+
[
lost?
"misflagged.gif"
"flagged.gif"
?
]
}
{
+clicked+
[
cell
#adjacent>>
0
or
number>string
"open"
".gif"
surround
]
}
{
f
[
"blank.gif"
]
}
}
case
]
if
"vocab:minesweeper/_resources/"
prepend
;