Handbook
Glossary
plant-seeds ( game -- game )
Vocabulary
hamurabi
.
private
Inputs
game
an
object
Outputs
game
an
object
Definition
USING:
accessors
combinators
io
kernel
math
;
IN:
hamurabi.private
:
plant-seeds
( game -- game )
"HOW MANY ACRES DO YOU WISH TO PLANT WITH SEED? "
input
{
{
[
over
acres>>
dupd
>
]
[
"acres"
]
}
{
[
over
stores>>
2
*
dupd
>
]
[
"stores"
]
}
{
[
over
population>>
10
*
dupd
>
]
[
"population"
]
}
[
f
]
}
cond
check-error
[
drop
plant-seeds
]
[
[
>>planted
]
[
2/
[
-
]
curry
change-stores
]
bi
]
if
nl
;