From 32ba70b59ce5df232744f04ca1016b7a5b68772f Mon Sep 17 00:00:00 2001 From: Simon-Mong <30740101+Simon-Mong@users.noreply.github.com> Date: Wed, 8 Sep 2021 19:23:27 +0800 Subject: [PATCH] replace 'glide' with 'reportRandomPosition' replace 'glide' with 'reportRandomPosition' --- stitchcode/objects.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/stitchcode/objects.js b/stitchcode/objects.js index 71da2870..86f969b9 100644 --- a/stitchcode/objects.js +++ b/stitchcode/objects.js @@ -1461,7 +1461,14 @@ SpriteMorph.prototype.initBlocks = function () { spec: 'text length of %s with size %n', defaults: ["hello", 21] }; - + this.blocks.reportRandomPosition = + { + only: SpriteMorph, + type: 'reporter', + category: 'motion', + spec: 'random position', + }; + // pen blocks this.blocks.isPenDown = @@ -1818,7 +1825,7 @@ SpriteMorph.prototype.blockTemplates = function (category) { //blocks.push(block('gotoXYIn')); //blocks.push(block('gotoXYBy')); blocks.push(block('doGotoObject')); - blocks.push(block('doGlide')); + blocks.push(block('reportRandomPosition')); blocks.push('-'); blocks.push(block('changeXPosition')); blocks.push(block('setXPosition'));