Handbook
Glossary
move-entire-cell ( board start dest -- board )
Vocabulary
gamelib
.
board
Inputs
board
an
object
start
an
object
dest
an
object
Outputs
board
an
object
Definition
USING:
accessors
kernel
math
sequences
;
IN:
gamelib.board
::
move-entire-cell
( board start dest -- board )
{
start dest
}
[
first
board
width>>
<
]
all?
{
start dest
}
[
second
board
height>>
<
]
all?
and
start
[
0
>=
]
all?
and
dest
[
0
>=
]
all?
and
[
board start dest
duplicate-cell
start
delete-cell
drop
]
when
board
;