Skip to content

Commit 4ffa064

Browse files
author
Antonino Tramontana
committed
added python animal verse code
1 parent 10bd28a commit 4ffa064

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/components/Activity.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,6 +1771,15 @@ export default {
17711771
};
17721772
17731773
1774+
Blockly.Python['coderbot_animal_verse_std'] = function(block) {
1775+
var dropdown_note = block.getFieldValue('note');
1776+
var dropdown_instrument = block.getFieldValue('instrument');
1777+
var value_duration = Blockly.Python.valueToCode(block, 'duration', Blockly.Python.ORDER_ATOMIC);
1778+
var alteration = "none";
1779+
var code = 'get_music().play_animal(note="'+dropdown_note+'", instrument="'+dropdown_instrument+'", alteration="'+alteration+'", duration="'+value_duration+'")\n';
1780+
return code;
1781+
};
1782+
17741783
17751784
17761785
Blockly.Python['coderbot_audio_listen'] = function(block) {

0 commit comments

Comments
 (0)