IF fnum% = 1 OR 4 OR 7 OR 10 THEN num% = 1you probably want:
r = int(rnd * 3) + 1 = 1, 2, 3Please forgive my ignorance. How does this work? At first glance, it looks like a calculated GOTO, but I feel I missed something.
Please forgive my ignorance. How does this work? At first glance, it looks like a calculated GOTO, but I feel I missed something.
You could cut a bunch of lines and just did:
r = int(rnd * 3) + 1 = 1, 2, 3
2 beats 1 and 3 beats 2 but 1 beats 3. What's a cool way to code that?
Please forgive my ignorance. How does this work? At first glance, it looks like a calculated GOTO, but I feel I missed something.
I'm thoroughly confused as well :)
R = INT(RND * 3) + 1
Value is either 1, 2, or 3 for R.
R = 1, 2, 3
IF num1 = 1 AND num2 = 3 THEN '1 BEATS 3
num1 = WINNER
ELSEIF num1 > num2 THEN '2 BEATS 1, 3 BEATS 2
num1 = WINNER
ELSE 'ELSE
num2 = WINNER
END IF
2 beats 1 and 3 beats 2 but 1 beats 3. What's a cool way to code that?