Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
faucomte97 committed Oct 18, 2023
1 parent 0e4fd0c commit accf6c2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 0 additions & 2 deletions game/static/game/js/blocklyCompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,6 @@ ocargo.BlocklyCompiler.prototype.createSequence = function (block) {
commands.push(new DeliverCommand(block));
} else if (block.type === "sound_horn") {
commands.push(new SoundHornCommand(block));
} else if (block.type === "puff_up") {
commands.push(new PuffUpCommand(block));
} else if (block.type === "controls_repeat_until") {
commands.push(this.createRepeatUntil(block));
} else if (block.type === "controls_repeat_while") {
Expand Down
6 changes: 1 addition & 5 deletions game/static/game/js/level_editor/owned_levels.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,9 @@ ocargo.OwnedLevels.prototype.save = function(level, id, finishedCallback) {
}

this.saving.saveLevel(level, id, false, function(newId) {

delete level.name;

this.saveState.saved(level, newId);
console.log("hello")
console.log(this.levels)
console.log(this)
alert("wait")

this.update();

Expand Down
7 changes: 3 additions & 4 deletions game/views/level.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,12 @@ def play_level(request, level, from_editor=False):
model_solution = level.model_solution

return_view = "level_editor" if from_editor else "levels"
print(block_data)

temp_block_data = []
for block in block_data:
if block not in temp_block_data:
temp_block_data.append(block)
[temp_block_data.append(block) for block in block_data if block not in temp_block_data]

block_data = temp_block_data

return render(
request,
"game/game.html",
Expand Down

0 comments on commit accf6c2

Please sign in to comment.