nextVisionResponse() {
    
    let response = new VisionResponse();
    let fake = this.COMMANDS[this.index];
    // Randomly generate fake objects
    for (let i = fake.length; i--;) {
      response.addBox(fake[i]);
    }
    
    this.index++;
    if (this.index >= this.COMMANDS.length) {
      this.index = 0;
    }
    return response;
  }
/************************************************************
   Iterate over multiple fake driving commands and add them to the car message
   Input:
   - none
   Output:
   - vision response (taken from the hard-coded array above)
   ************************************************************/
Iterate over multiple fake driving commands and add them to the car message
Input:
none
Output:
vision response (taken from the hard-coded array above)
Iterate over multiple fake driving commands and add them to the car message Input : none Output : vision response ( taken from the hard - coded array above )
nextVisionResponse() {
    let response = new VisionResponse();
    let fake = this.COMMANDS[this.index];
    for (let i = fake.length; i--;) {
      response.addBox(fake[i]);
    }
    this.index++;
    if (this.index >= this.COMMANDS.length) {
      this.index = 0;
    }
    return response;
  }
nextVisionResponse ( ) { let response = new VisionResponse ( ) ; let fake = this . COMMANDS [ this . index ] ; for ( let i = fake . length ; i -- ; ) { response . addBox ( fake [ i ] ) ; } this . index ++ ; if ( this . index >= this . COMMANDS . length ) { this . index = 0 ; } return response ; }
Iterate over multiple fake driving commands and add them to the car message
Input:
 none
Output:
 vision response (taken from the hard-coded array above)
Iterate over multiple fake driving commands and add them to the car message Input : none Output : vision response ( taken from the hard - coded array above )
// Randomly generate fake objects