task main() { waitforStart(); init(); /* move(45); //position to correct for distance turn(-45); //move(10); //distance to first box dropBlock(); move(35); //clear boxes, to ramp */ //start facing wall with right front wheel at edge of block 3 turnReverse(45); move(-37); //negative distance to box dropBlock(); servo[deployArm] = 0; wait1Msec(3000); servo[deployArm] = 128; move(32); //clear boxes turn(90); move(55); // parallel to ramp turn(-90); move(-115); stop(); }
NumboBlock* NumboLevel::dropRandomBlock() { CCASSERT(!isFull(), "Can't drop any more blocks"); int val = arc4random() % (BLOCK_MAX_VALUE - 1) + 1; int col = arc4random() % (NUM_COLS); while(numBlocks[col] >= NUM_ROWS) col = arc4random() % (NUM_COLS); return dropBlock(col, val); }
task main() { //waitforStart(); init(); move(49); //position to correct for distance turn(-45); move(10); //distance to first box dropBlock(); move(42); //clear boxes, to ramp turn(90); move(75); //onto ramp stop(); }