forked from marva/sumorobot-web
remove sumorobot object replacement
This commit is contained in:
parent
13d9a967d9
commit
4361448951
12
sumorobot.js
12
sumorobot.js
@ -410,16 +410,12 @@ window.onload = function() {
|
|||||||
sumostart = true;
|
sumostart = true;
|
||||||
/* if we are in Python mode */
|
/* if we are in Python mode */
|
||||||
if (pythonEnabled) {
|
if (pythonEnabled) {
|
||||||
/* add the an empty block ID to the functions */
|
/* send the code from the textarea to the SumoRobot */
|
||||||
var code = $("#blocklyCode").val().replace(/sumorobot./g, "").replace(/\)/g, ", \"\")");
|
sumorobot.send("start:" + $("#blocklyCode").val());
|
||||||
/* is_enemy doesn't need the , */
|
|
||||||
code = code.replace(/\(, ""\)/g, "(\"\")");
|
|
||||||
/* send the code to the SumoRobot */
|
|
||||||
sumorobot.send("start:" + code);
|
|
||||||
/* otherwise when we are in blockly mode */
|
/* otherwise when we are in blockly mode */
|
||||||
} else {
|
} else {
|
||||||
/* send the code to the SumoRobot */
|
/* send the code from the blocks to the SumoRobot */
|
||||||
sumorobot.send("start:" + sumocode.replace(/sumorobot./g, ""));
|
sumorobot.send("start:" + sumocode);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user