forked from marva/sumorobot-web
fix blocks to code
This commit is contained in:
parent
f23c50f331
commit
afa0b56db8
@ -137,12 +137,12 @@ window.addEventListener('load', function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Blockly.Python['sumorobot_opponent'] = function(block) {
|
Blockly.Python['sumorobot_opponent'] = function(block) {
|
||||||
var code = 'sumorobot.is_opponent()';
|
var code = 'sumorobot.is_opponent();;' + block.id;
|
||||||
return [code, Blockly.Python.ORDER_ATOMIC];
|
return [code, Blockly.Python.ORDER_ATOMIC];
|
||||||
};
|
};
|
||||||
|
|
||||||
Blockly.Python['sumorobot_line'] = function(block) {
|
Blockly.Python['sumorobot_line'] = function(block) {
|
||||||
var code = 'sumorobot.is_line(' + block.getFieldValue('LINE') + ')';
|
var code = 'sumorobot.is_line(' + block.getFieldValue('LINE') + ');;' + block.id;
|
||||||
return [code, Blockly.Python.ORDER_ATOMIC];
|
return [code, Blockly.Python.ORDER_ATOMIC];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user