I have a pice of initialiser code that should run when a new instance of a class is created, without having to be called. How would I do that ?
Update:
class Pice {
public int Type;
public void init() {
Type = random(sudo);
}
}
Now I would like the init to run only once when an instance of the class is created. So where do I put it ?