This topic is now archived and is closed to further replies.


RPS game

Recommended Posts

Original post by mickey
use rand() % 2 + 1
store the return value in a variable, then put statements like if value == 1 then rock, else if value == 2 then paper else scissors,

That would be rand() % 3 + 1 ... and be warned that the low bits of rand() aren''t that random.

Share this post

Link to post
Share on other sites