Handbook
Glossary
row-win ( board -- ? )
Vocabulary
gamelib
.
demos
.
tic-tac-toe
Inputs
board
an
object
Outputs
?
an
object
Definition
USING:
gamelib.board
kernel
sequences
;
IN:
gamelib.demos.tic-tac-toe
::
row-win
( board -- ? )
{
0 1 2
}
[
{
"vocab:gamelib/demos/tic-tac-toe/resources/X.png"
}
swap
board
swap
get-row
all-equal-value?
]
any?
{
0 1 2
}
[
{
"vocab:gamelib/demos/tic-tac-toe/resources/O.png"
}
swap
board
swap
get-row
all-equal-value?
]
any?
or
;