Original Post
Bored? Need something to do? Become a master player of rock, paper, scissors
int henny() { return((*opp_history?opp_history[random()%*opp_history+1]+1:random())%3); }int henny() { return 0; }Quote:It won't cycle because it chooses a random previous move as a base to 'cycle from', so if the first move is 1, the second move will be 2, and the third move can be 2 or 3, and the fourth move can be 1, 2, or 3.
Original post by N8dunn
yeah, i overlooked that +1... so that makes it even worse, it just cycles. at least if it repeats itself, there's that part of your mind saying "it chose rock the past 24 times, it HAS to choose something else this time." of course, the parts of the program outside of that function might do some weird, wild stuff. i inferred a lot of that.
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more