Pages: 1
Topic closed
I read something about "Blocks", but got confused.
I'm used to older programming languages that have functions or procedures that look something like this:
function playCard(westHand, tableHand,nbrCard)
**this function is called each time West plays a card
possibly returns a value
What I'm doing now is repeating the same blocks of code over and over and just changing a parameter or two each time through. For example, I might change whose turn it is to play a card(west, north, east or south).
Is there something I'm missing that will allow you to code more efficiently?
Offline
Scratch currently doesn't support functions or procedures, but Scratch 2.0 will have procedures (when it is released).
The closest thing Scratch has is the "broadcast [] and wait" block in control, which will activate the code under the hat block "when I receive []", and then continue with the script below after it is done.
Offline
Topic closed
Pages: 1