its just random number generation 1-3

and a if function

if(random==3)
computer.choice="stone"

and so on.