Skip to content

Commit

Permalink
Always generate start block at position (100, 100)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelrahmanDeghedy committed Jan 14, 2024
1 parent 11e95a6 commit 5025c8f
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 5025c8f

Please sign in to comment.