var Blocks = require('./blocks');

/**
 * @fileoverview
 * A Target is an abstract "code-running" object for the Scratch VM.
 * Examples include sprites/clones or potentially physical-world devices.
 */

/**
 * @param {?Blocks} blocks Blocks instance for the blocks owned by this target.
 * @constructor
 */
function Target (blocks) {
    if (!blocks) {
        blocks = new Blocks(this);
    }
    this.blocks = blocks;
}

module.exports = Target;

@@ -26,16 +26,50 @@
 locks');
+%0Avar uid = require('../util/uid');
 %0A%0A/**%0A *
@@ -422,16 +422,193 @@
 ;%0A    %7D%0A
+    /**%0A     * A unique ID for this target.%0A     * @type %7Bstring%7D%0A     */%0A    this.id = uid();%0A    /**%0A     * Blocks run as code for this target.%0A     * @type %7B!Blocks%7D%0A     */%0A
     this

Add unique ID for Targets