Handbook
Glossary
piece? ( object -- ? )
Vocabulary
tetris
.
piece
Inputs and outputs
object
an
object
?
a
boolean
Word description
Tests if the object is an instance of the
piece
class.
Definition
USING:
classes.tuple.private
kernel
slots.private
;
IN:
tetris.piece
:
piece?
( object -- ? )
dup
tuple?
[
layout-of
7
slot
\
piece
eq?
]
[
drop
f
]
if
;