set-cell ( board location new-cell -- board )


Vocabulary
gamelib.board

Inputs
boardan object
locationan object
new-cellan object


Outputs
boardan object


Definition


:: 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 ;