private Pacman pacman;
public Location whereIsGhost(){
return pacman.getLocation();
}
incompatible types: java.awt.Point cannot be converted to ch.aplu.jgamegrid.Location
How to fix it? Which type a compatible with java.awt.Point?
private Pacman pacman;
public Location whereIsGhost(){
return pacman.getLocation();
}
incompatible types: java.awt.Point cannot be converted to ch.aplu.jgamegrid.Location
How to fix it? Which type a compatible with java.awt.Point?
I believe you have three choices
PacmagegetLocationto return ach.aplu.jgamegrid.Location, orwhereIsGhostto return ajava.awt.Point, orLocationto extendPoint.As for which types are compatible with
java.awt.Pointthe Javadoc lists no known sub-classes.