// statement below. Now, every result is 2.
while (jitter_count < 25) {
random_roll = random(3);
if (random_roll = 2) {
Well, you assigned 2 to random_roll, so the code IS behaving correctly.
== is the comparison operator.
// statement below. Now, every result is 2.
while (jitter_count < 25) {
random_roll = random(3);
if (random_roll = 2) {
Well, you assigned 2 to random_roll, so the code IS behaving correctly.
== is the comparison operator.