using new Drone.extend() style invocation. added chessboard floor.

This commit is contained in:
walterhiggins 2014-08-23 16:45:16 +01:00
parent e874ba3ff6
commit cdccd1fe2e

View file

@ -1,9 +1,9 @@
var Drone = require('../drone').Drone; var Drone = require('../drone').Drone;
var blocks = require('blocks');
// //
// constructs a medieval fort // constructs a medieval fort
// //
Drone.extend('fort', function( side, height ) { function fort( side, height ) {
var brick = 98, var brick = 98,
turret, turret,
i, i,
@ -31,6 +31,7 @@ Drone.extend('fort', function( side, height ) {
// build walls. // build walls.
// //
this.chkpt('fort') this.chkpt('fort')
.down().chessboard(blocks.wool.black, blocks.wool.white, side).up()
.box0(brick,side,height-1,side) .box0(brick,side,height-1,side)
.up(height-1); .up(height-1);
// //
@ -87,5 +88,6 @@ Drone.extend('fort', function( side, height ) {
.fwd(1) // move inside fort .fwd(1) // move inside fort
.box(ladder, 1,height-1,1) .box(ladder, 1,height-1,1)
.move('fort'); .move('fort');
}); }
Drone.extend(fort);