From e4b222031a5022ecdf684b1c209bb7a484aa1547 Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 14 Jan 2024 17:46:56 +0000 Subject: [PATCH] Always generate start block at position (100, 100) --- game/static/game/js/blocklyControl.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/game/static/game/js/blocklyControl.js b/game/static/game/js/blocklyControl.js index 4e3cc28a7..f3ade14ba 100644 --- a/game/static/game/js/blocklyControl.js +++ b/game/static/game/js/blocklyControl.js @@ -80,7 +80,8 @@ ocargo.BlocklyControl.prototype.reset = function () { // has a start button, if not then create a start button if (!wasGameStarted(allBlocks)) { let startBlock = this.createBlock("start"); - startBlock.moveBy(30 + (i % 2) * 200, 30 + Math.floor(i / 2) * 100); + // Generate the first block on the (100, 100) position + startBlock.moveBy(100, 100); } this.clearIncorrectBlock();