Discuss Scratch

starswap
Scratcher
5 posts

New blocks the scratch team should add.

I think that sometimes there aren't enough blocks to make everything work so this is for any blocks you think should be added.
starswap
Scratcher
5 posts

New blocks the scratch team should add.

There should be a block for shuffling lists.
iTweak0r
Scratcher
100+ posts

New blocks the scratch team should add.

You can post your own ideas here, but you shouldn't make a topic to suggest new blocks. People can just make their own suggestions.

Specs 1 (main): Safari on MacBook Pro; Late 2008; Core 2 Duo @2.4GHz; 8GB 1067MHz DDR3 RAM; Mac OS X 10.10;

Specs 2: Firefox on Lenovo Yoga 13; Core i7 @2.0GHz; 8GB 1600MHz DDR3 RAM;
tri-boots Windows 10 Pro, Mac OS X 10.10, and Ubuntu 14.01 LTS;

All have the latest version of Flash.
starswap
Scratcher
5 posts

New blocks the scratch team should add.

ok thanks
mobluse
Scratcher
100+ posts

New blocks the scratch team should add.

starswap wrote:

There should be a block for shuffling lists.
You could use a procedure for this:
define shuffle
set [_i v] to (length of [indices v])
repeat ((_i) - (1))
set [_j v] to (pick random (1) to (_i))
set [_temp v] to (item (_i) of [indices v])
replace item (_i) of [indices v] with (item (_j) of [indices v])
replace item (_j) of [indices v] with (_temp)
change [_i v] by (-1)
end

Powered by DjangoBB