From e4abd679d2e607ad70a8a0df0a45384af25f6053 Mon Sep 17 00:00:00 2001 From: walterhiggins Date: Sat, 23 Aug 2014 14:19:04 +0100 Subject: [PATCH] rboxcall not used anywhere (ever?) --- src/main/js/plugins/drone/contrib/rboxcall.js | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/main/js/plugins/drone/contrib/rboxcall.js diff --git a/src/main/js/plugins/drone/contrib/rboxcall.js b/src/main/js/plugins/drone/contrib/rboxcall.js deleted file mode 100644 index 222f101..0000000 --- a/src/main/js/plugins/drone/contrib/rboxcall.js +++ /dev/null @@ -1,34 +0,0 @@ -var Drone = require('../drone').Drone; - -/** -* Iterates over each cube in a cubic region. For each cube has a chance to callback your -* function and provide a new drone to it. -* -* Parameters: -* callback - any function that accepts a drone as its first argument -* probability - chance to invoke your callback on each iteration -* width - width of the region -* height - (Optional) height of the region, defaults to width -* depth - (Optional) depth of the cube, defaults to width -*/ - -Drone.extend("rboxcall", function( callback, probability, width, height, depth ) { - this.chkpt('rboxcall-start'); - - for(var i = 0; i < width; ++i) { - this.move('rboxcall-start').right(i); - for(var j = 0; j < depth; ++j) { - this.move('rboxcall-start').right(i).fwd(j); - for(var k = 0; k < height; ++k) { - if(Math.random()*100 < probability) { - callback.call(null, new Drone(this.x, this.y, this.z)); - } - this.up(); - } - } - } - - this.move('rboxcall-start'); - - return this; -});