Karel 2.2.1 - increment

PHOTO EMBED

Sun Nov 14 2021 17:59:36 GMT+0000 (Coordinated Universal Time)

Saved by @blacknomb33r

void increment(){
    if(onBeeper()){
        pickBeeper();
        moveForward();
        dropBeeper();
    } else{
        dropBeeper();
    }
}
content_copyCOPY

This code works for Karel 2.2.1 Increment. Adding 1 Beeper to solve the task. Use an if statement.