4 ms·
From [1], a terse one-liner that outperformed many longer and more complicated entries in The Second International RoShamBo Programming Competition: int he
by candu 7y ago
From [1], a terse one-liner that outperformed many longer and more complicated entries in The Second International RoShamBo Programming Competition:
int henny() {
return((*opp_history?opp_history[random()%*opp_history+1]+1:random())%3);
}
[1] https://webdocs.cs.ualberta.ca/~darse/rsbpc.html https://webdocs.cs.ualberta.ca/~darse/rsbpc.html