Anonymous user
Rock-paper-scissors: Difference between revisions
→{{header|C++}}
Line 683:
r = rand() % total;
s = statistics.getMove( PLAYER, ROCK );▼
{
if( r < s ) return SPOCK;▼
r -= s;▼
}
▲ if( r < s ) return SCISSORS;
return ROCK;
|