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