Implement Rock Scissors Paper (Game 74) in C#

This commit is contained in:
Jesse McDowell
2021-02-20 11:49:03 -08:00
parent ebf3d71418
commit fb2822b1e5
5 changed files with 176 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
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;
}
}
}