BAT Coding Challenge Snippet #1

PHOTO EMBED

Tue Sep 03 2024 20:15:47 GMT+0000 (Coordinated Universal Time)

Saved by @TechBox #c++

    // Challenge Solution - Part #1 ------------------------------------------------------
    // Comment out the following code
    /*if(hit == 1){
      post_hit_AI();
    } else {
      try_to_place_targetAI();
    }*/

    // Create a variable that represents the computer's "chance of cheating"
    int cheatingPercentage = 30;

    // Create a variable to hold the value from the "dice roll"
    int pz;

    // Roll the dice to get a percentage chance of cheating
    pz = random(100);
    
content_copyCOPY