|
|
|
|
@ -1,15 +1,21 @@
|
|
|
|
|
const numBeats = Math.ceil(Math.random()*9);
|
|
|
|
|
|
|
|
|
|
let resultString = '';
|
|
|
|
|
const instructionPosibilities = [ 'n', 'p', 'm', 'b' ]
|
|
|
|
|
const appendages = [ 'lh', 'rh', 'lf', 'rf' ];
|
|
|
|
|
|
|
|
|
|
for(let appendage of appendages){
|
|
|
|
|
let resultString = '';
|
|
|
|
|
for(let i = 1; i <= numBeats; i++){
|
|
|
|
|
const instructionIndex = Math.floor(Math.random()*instructionPosibilities.length);
|
|
|
|
|
|
|
|
|
|
resultString += instructionPosibilities[instructionIndex] + ' ';
|
|
|
|
|
const hit = Math.floor(Math.random()*2);
|
|
|
|
|
if(hit === 1){
|
|
|
|
|
resultString += appendage + ' ';
|
|
|
|
|
} else {
|
|
|
|
|
resultString += ' ';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
console.log(resultString);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const breakDown = (node)=>{
|
|
|
|
|
|
|
|
|
|
|