Files
basic-computer-games/74 Rock Scissors Paper/csharp/Choice.cs
2021-02-20 13:35:59 -08:00

20 lines
438 B
C#

namespace RockScissorsPaper
{
public class Choice
{
public string Selector {get; private set; }
public string Name { get; private set; }
internal Choice CanBeat { get; set; }
public Choice(string selector, string name) {
Selector = selector;
Name = name;
}
public bool Beats(Choice choice)
{
return choice == CanBeat;
}
}
}