示例#1
0
        public VictoryStatus CalculateVictory(RPSWeapon player, RPSWeapon cpu)
        {
            int playerIndex = weapons.IndexOf(player);
            int cpuIndex    = weapons.IndexOf(cpu);

            return(CalculateVictory(playerIndex, cpuIndex));
        }
示例#2
0
 public bool TryParse(string name, out RPSWeapon weapon)
 {
     weapon = Parse(name);
     return(weapon != null);
 }
示例#3
0
 public bool TryParse(string name, out RPSWeapon weapon)
 => (weapon = Parse(name)) != null;