From cdccd1fe2e95ce0aa821d5c1f3a1429aec5f2f46 Mon Sep 17 00:00:00 2001 From: walterhiggins Date: Sat, 23 Aug 2014 16:45:16 +0100 Subject: [PATCH] using new Drone.extend() style invocation. added chessboard floor. --- src/main/js/plugins/drone/contrib/fort.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/js/plugins/drone/contrib/fort.js b/src/main/js/plugins/drone/contrib/fort.js index 42a0f2c..5e5782a 100644 --- a/src/main/js/plugins/drone/contrib/fort.js +++ b/src/main/js/plugins/drone/contrib/fort.js @@ -1,9 +1,9 @@ var Drone = require('../drone').Drone; - +var blocks = require('blocks'); // // constructs a medieval fort // -Drone.extend('fort', function( side, height ) { +function fort( side, height ) { var brick = 98, turret, i, @@ -31,6 +31,7 @@ Drone.extend('fort', function( side, height ) { // build walls. // this.chkpt('fort') + .down().chessboard(blocks.wool.black, blocks.wool.white, side).up() .box0(brick,side,height-1,side) .up(height-1); // @@ -87,5 +88,6 @@ Drone.extend('fort', function( side, height ) { .fwd(1) // move inside fort .box(ladder, 1,height-1,1) .move('fort'); -}); +} +Drone.extend(fort);