Okay, so I'm starting to use Abstract classes, but I have a question : I have this abstract class Quest
. My objective is to, when initializing a new Quest
object, give it a random Quest
type (Represented by a class extending Quest). For now my code is :
switch (r) {
case 0:
quest = new Bandit_Raids2();
break;
case 1:
quest = new Bandit_Raids();
break;
case 2:
quest = new Escort_Mission();
}
Is there any way to do this automatically, or just cleaner ?