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
Pacmage
getLocation
to return ach.aplu.jgamegrid.Location
, orwhereIsGhost
to return ajava.awt.Point
, orLocation
to extendPoint
.As for which types are compatible with
java.awt.Point
the Javadoc lists no known sub-classes.