public Outcome Play(PacType enemy) { if (_type == enemy._type) { return(Outcome.Draw); } if ((_type == "ROCK" && enemy._type == "PAPER") || (_type == "PAPER" && enemy._type == "SCISSORS") || _type == "SCISSORS" && enemy._type == "ROCK") { return(Outcome.Loss); } return(Outcome.Win); }
public static PacType ToBeat(PacType type) { switch (type.ToString()) { case "PAPER": return(Scissors); case "ROCK": return(Paper); case "SCISSORS": return(Rock); default: return(Rock); } }
public bool Equals(PacType other) { return(_type == other._type); }