Is it actually a 1/3 chance of winning though? Is that including a draw as a win?
I've tried coding it up here:
https://gist.github.com/andyhmltn/5c8c5734fe894db5aa02
Baring in mind it was a rushed 5 minute bodge-job so it could be wrong but there seems to be a massive skew towards draws
After more tests with this code it seems there's an 11% chance of winning if it's random. Baring in mind javascripts RNG