C#C
C#2y ago
GregTheEgg

Need help compressing an RPS system

// I really couldn't think of anything better minus a load of if conditionals, mb.
            if (inter.value == random){
                Debug.Log("tie");
            }
            if (inter.value == 1 && random == 3){
                Debug.Log("win");
            }
            if (inter.value == 2 && random == 1){
                Debug.Log("win");
            }
            if (inter.value == 3 && random == 2){
                Debug.Log("win");
            }
            if (inter.value == 1 && random == 2){
                Debug.Log("lose");
            }
            if (inter.value == 2 && random == 3){
                Debug.Log("lose");
            }
            if (inter.value == 3 && random == 1){
                Debug.Log("lose");
            }
Was this page helpful?