Hi There;
I have a problem that drives me mad. I am abstracting a chess.
Here is the piece:
public abstract class Tas {
public int Anahtar;
public Renk Rengi;
public int Degeri;
public Tas()
{
this.Anahtar = Integer.MIN_VALUE;
this.Rengi = Renk.TANIMSIZ;
this.Degeri = Integer.MIN_VALUE;
}
}
Here is the chess play rules:
public class SatrancYapayZeka
{
public boolean korunuyorMuRakipTaslarTarafindan(Tas hamleYapanTas,Lokasyon olasiLokasyon ,Tas[][] satranctahtasi)
{
}
}
Here is the bishop class that derived from pieces:
public class Fil extends Tas
{
@Override
public ArrayList<Lokasyon> GetirKoruduguKareleri(Lokasyon lokasyonaGore,Tas[][] tahta)
{
SatrancYapayZeka zeka = new SatrancYapayZeka();
for (int yenix = xMevcut + 1, yeniy = yMevcut + 1; yenix < 8 && yeniy < 8; yenix++, yeniy++) {
if(!zeka.korunuyorMuRakipTaslarTarafindan(this,komsuLokasyon ,tahta))
{
lokasyonListe.add(komsuLokasyon);
}
}
}
}
I am getting
The method korunuyorMuRakipTaslarTarafindan(Tas, Lokasyon, Tas[][]) in the type SatrancYapayZeka is not applicable for the arguments (Renk, Lokasyon, Tas[][])
at the error point 1, I demand "this" however, it presumes for "Renk" enum that defined inside Piece. What I am missing?
Thanks in advance.
What I have tried:
I have looked at the stackoverflow but the solutions described there is not suitable for me.