using new Drone.extend() style invocation. added chessboard floor.
This commit is contained in:
parent
e874ba3ff6
commit
cdccd1fe2e
1 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Reference in a new issue