mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 23:26:40 -08:00
20 lines
438 B
C#
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;
|
|
}
|
|
}
|
|
}
|