Skip to content

Instantly share code, notes, and snippets.

Shorter than usual session - just 75 mins.

  1. Dynamic Warm-up (5 mins) https://www.youtube.com/watch?v=QNnDto7Cdio&t=75s
    • Jumping Jacks x 10
    • Seals x 10 (clap in front)
    • Balance - Stand on one leg with other held behind. Swap.
    • High Knees
    • Lunges
    • Side-shuffle
  • Soldier Kicks

Shorter than usual session - just 75 mins.

  1. Dynamic Warm-up (5 mins) https://www.youtube.com/watch?v=QNnDto7Cdio&t=75s
    • Jumping Jacks x 10
    • Seals x 10 (clap in front)
    • Balance - Stand on one leg with other held behind. Swap.
    • High Knees
    • Lunges
    • Side-shuffle
  • Soldier Kicks
var lightning = require('lightning');
events.projectileHit( function(event) {
if ( entities.arrow( event.projectile ) &&
entities.player( event.projectile.owner ) ) {
lightning( event.projectile );
}
}

Some notes on the ScriptCraft Workshop for CoderDojo@IBM

There were some very good ideas for improvements and additions. One attendee wondered if it was possible to populate buildings as they were built. I thought I'd already written a spawn module to do this but it turns out I hadn't. I've just added a spawn module to version 3.1.11 which is out today (21st Nov 2015). Get it here http://scriptcraftjs.org/download/latest/

The Drone now also has a spawn method so you can for example unleash a horde of zombies by combining the spawn(), movement and times() functions like this...

/js spawn('ZOMBIE').fwd().times(10)
/*
testing a forgetful memoized promise: A promise, memoized which is forgotten after a given duration.
*/
var Q = require('q');
var _ = require('underscore');
function expensive( req ){
var result = Q.defer();
var msg = JSON.stringify(req);
console.log(new Date() + ' about to do something expensive: ' + msg);
@walterhiggins
walterhiggins / writing-minecraft-plugins-errata.md
Last active May 15, 2016 19:01
Writing Minecraft Plugins: Errata

A Beginner's Guide to Writing Minecraft Plugins: Errata

Introduction

This is list of errors and their corrections that were found after the book was published. This document is a work in progress. If you find additional mistakes in the book please email walter.higgins@gmail.com.

Chapter 7

Page 84, Listing 7.3

The following code is listed with no explanation of the === operator and how it differs from the == operator which is explained in Chapter 3 (Comparing numbers):

@walterhiggins
walterhiggins / nashorn-macos-1.8.0_40.md
Last active August 29, 2015 14:22
Nashorn class cast exception for vararg method params