get a better browser, dinosaur m8
Raw Code, easier way to drag blocks on to the screen will work hopefully.
0 D_Log The woof shredder test Segments are separated by semicolons, whitespace between are ignored. Each segment consists of: [Delay] [Function name] [parameters...] and don't forget the semicolon. Parameters can be strings, numbers, objects, or expressions: "string" 5 object.value+5 Cursor Indents don't divide lines, this is still part of the D_Log function. This example is the Bubble Sort See shredwoof.js for more information.; 0 D_Log This function creates a cursor. Cursors do all the number moving; 0 Create Cursor Cur0 value:0 textH:center textV:bottom; 0 D_Log This one creates the array named Bar change value to random, max, min, ramp, ramp_int, or shuffle; 0 Create BarArray Bar value:shuffle x:-6 y:2 width:12 size:32; 0 D_Log Move Cursor to position 0 of Bar 0.3 MoveTo Cur0 Bar 0; 0 D_Log Start doing the actual sorting. A cursor can select objects and put it into slots. In this while loop: - Cur0 selects the index it's on as 0. - Moves to the next index - Cur0 selects the index it's on as 1. - If 0 is larger then 1, then swap them. (not really); 0.0 While (Cur0.index < Bar.value.length - 1 && Cur0.value != Bar.value.length - 1) { 0.0 CursorSelect Cur0 0; 0.05 MoveTo Cur0 Bar Cur0.index+1; 0.0 CursorSelect Cur0 1; 0.0 If (Bar.value[Cur0.index] < Bar.value[Cur0.index - 1]) { 0.1 CursorSwap Cur0 0 1; } 0.0 If (Cur0.index == Bar.value.length - 1 - Cur0.value) { 0.1 CursorOp Cur0 + 1; 0.1 MoveTo Cur0 Bar 0; } } 0.1 CursorOp Cur0 = "We did it!";
Run
what have you done