Suppose I developed a wrestling game where all wrestlers fight with each-other.
So I designed the classes and interfaces like the following:
public interface IWrestler
{
void Attack();
}
public class Sumo : IWrestler
{
public Sumo()
{
}
public void Attack()
{
Console.Write("Sumo attacked the opponent...");
}
}
public class Shaolin : IWrestler
{
//------ etc.
}
This year I want the wrestlers to carry weapons (which was not thought earlier).
Suppose I have already created a large number of classes.
What design pattern can be used now to solve this problem? Or, How should I solve this problem now?
What design pattern could be used initially to avoid this problem?