Handbook
Glossary
set-cell ( board location new-cell -- board )
Vocabulary
gamelib
.
board
Inputs
board
an
object
location
an
object
new-cell
an
object
Outputs
board
an
object
Definition
USING:
accessors
kernel
prettyprint
sequences
strings
;
IN:
gamelib.board
::
set-cell
( board location new-cell -- board )
location
first2
:>
( x y ) board
cells>>
:>
cells new-cell
sequence?
new-cell
string?
not
and
[
new-cell x y cells
nth
set-nth
]
[
"New cell is not a sequence! No changes made."
.
]
if
board
;