So here is a class:
public class Palya {
Mezo[][] m;
public Palya(Mezo[][] m){
this.m = m;
}
And it's derived:
public class PalyaTeszt extends Palya{
public PalyaTeszt(Mezo[][] m) {
super(new Mezo[][] {
{new Szikla(), new Szikla(), new Viz(), new Szikla(), new Szikla(), new Preri(true)},
{new Szikla(), new Szikla(), new Preri(false), new Preri(false), new Preri(false), new Szikla()},
{new Szikla(), new Szikla(), new Preri(false), new Preri(false), new Szikla(), new Szikla()},
{new Szikla(), new Szikla(), new Preri(false), new Szikla(), new Viz(), new Preri(false)},
{new Szikla(), new Szikla(), new Preri(false), new Szikla(), new Viz(), new Szikla()},
{new Preri(true), new Preri(false), new Preri(false), new Preri(false), new Preri(false), new Preri(false)}
});
}
}
In the derived constructor the array is initialized with an other class called Mezo, this Mezo[][] m class has methods that i would like to access to, but there is no name for it, like m.getSomething(). How can this be initialized in the way that i can use the Mezo's methods? Would it be better if the Palya was just an interface? The meaning of Palya is a 6x6 fields like chess board just for different purpose. I would like to have 6 different Palya.