// 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);
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter