Handbook
Glossary
get-point-color ( point -- color )
Vocabulary
roms
.
space-invaders
Inputs
point
an
object
Outputs
color
an
object
Definition
USING:
combinators
kernel
math
math.order
sequences
;
IN:
roms.space-invaders
:
get-point-color
( point -- color )
first2
{
{
[
dup
184 238
between?
pick
0 223
between?
and
]
[
2drop
green
]
}
{
[
dup
240 247
between?
pick
16 133
between?
and
]
[
2drop
green
]
}
{
[
dup
247 215
-
247 184
-
between?
pick
0 223
between?
and
]
[
2drop
red
]
}
[
2drop
white
]
}
cond
;