The function checkblock()
checks whether a square on a board has been filled. When checkblock(4,2)
is called, the value "A" is returned.
function checkblock(r,c)
if gamegrid[r,c] == "A" or gamegrid[r,c] == "B" then
outcome = gamegrid[r,c]
else
outcome = "FREE"
endif
return outcome
endfunction
State one feature of checkblock()
that shows that it is a function and not a procedure.
Did this page help you?