Files
Memory/Memory.Logic/Card.cs
2024-11-05 19:01:21 +01:00

21 lines
457 B
C#

namespace Memory.Logic
{
public class Card(int id)
{
public int ID { get; } = id;
public bool IsChoice1 { get; set; } = false;
public bool IsChoice2 { get; set; } = false;
public bool Completed { get; set; } = false;
public bool Matches(Card card)
{
return ID == card.ID;
}
public bool Selected()
{
return IsChoice1 || IsChoice2;
}
}
}