24 lines
No EOL
493 B
C#
24 lines
No EOL
493 B
C#
public class Item
|
|
{
|
|
public string Name { get; set; }
|
|
public string Description { get; set; }
|
|
public virtual string Type { get; set; }
|
|
|
|
public Item(string name, string description){
|
|
Name = name;
|
|
Description = description;
|
|
}
|
|
|
|
public virtual void Action()
|
|
{
|
|
Console.WriteLine("Item has been used");
|
|
}
|
|
|
|
public virtual Item Clone()
|
|
{
|
|
return new Item(Name, Description)
|
|
{
|
|
Type = this.Type
|
|
};
|
|
}
|
|
} |