Skip to content

Commit

Permalink
Always generate start block at position (100, 100) (#1568)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelrahmanDeghedy authored Jan 16, 2024
1 parent b0412fd commit 17149ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion game/static/game/js/blocklyControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 17149ce

Please sign in to comment.