Skip to content

Commit

Permalink
Revert "fix: Set Python scores to 10"
Browse files Browse the repository at this point in the history
This reverts commit d2f2a9c.
  • Loading branch information
faucomte97 committed Feb 22, 2024
1 parent d2f2a9c commit d3c688e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 69 deletions.
28 changes: 0 additions & 28 deletions game/migrations/0090_python_levels_no_algo_score.py

This file was deleted.

30 changes: 0 additions & 30 deletions game/migrations/0091_set_python_scores_to_10.py

This file was deleted.

20 changes: 9 additions & 11 deletions game/static/game/js/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ ocargo.Game.prototype.setup = function () {
}
}


// Function being called when there is a change in game level.
ocargo.Game.prototype.onLevelChange = function() {
const currentLevelId = LEVEL_ID;
localStorage.setItem('currentEpisode', EPISODE);
const currentLevelId = LEVEL_ID;
localStorage.setItem('currentEpisode', EPISODE);
}

restoreCmsLogin()
Expand Down Expand Up @@ -123,7 +123,7 @@ ocargo.Game.prototype.onLevelChange = function() {
}

this.drawing.enablePanning()

const showMascot = BLOCKLY_ENABLED && !PYTHON_VIEW_ENABLED && LEVEL_NAME <= 80; // show mascot on Blockly-only levels that are not above 80

ocargo.Drawing.startPopup(
Expand All @@ -146,7 +146,7 @@ document.addEventListener("DOMContentLoaded", function() {
if (currentEpisode) {
localStorage.setItem('currentEpisode', currentEpisode);
}
});
});

ocargo.Game.prototype.clearWorkspaceNameInputInSaveTab = function () {
$('#workspaceNameInput').val('')
Expand Down Expand Up @@ -238,12 +238,10 @@ ocargo.Game.prototype.sendAttempt = function (score) {
return /^(GET|HEAD|OPTIONS|TRACE)$/.test(method)
}

// TODO: Remove below - keeping it for now as a reminder that we need to
// implement some kind of algorithm score for Python levels.
// // hack scores so that it works for demo and python TODO implement max scores and remove this!!
// if (PYTHON_ENABLED) {
// score *= 2
// }
// hack scores so that it works for demo and python TODO implement max scores and remove this!!
if (PYTHON_ENABLED) {
score *= 2
}

// Check that we should actually be sending an attempt - either if only blockly is enabled
// or if python is enabled and we're on the python tab (assumes they don't change tab quickly...)
Expand Down

0 comments on commit d3c688e

Please sign in to comment.