Rock - Paper - Scissors

    return ((3 + urps - crps) % 3);
// 0 rock, 1 paper, 2 scissors
// X defeated by (X+1) % 3, X defeats (X+2) % 3, add 3 to avoid
negative integer
// return 1 if urps wins, 2 if crps wins, 0 if draw.