I am trying to make a slide puzzle game. I have 8 "Tile" actors and one "Blank" actor on the screen. I want my Tile actor to check if is touching the Blank actor. If it is, I want the Tile to get the x,y coordinate of the Blank actor, and I wnt them to swap places. The code I wrote that I thought would accomplish this is:
}but when I compile, I get "non-static method getX() cannot be referenced from a static context"
Any nudges as to what I did wrong would be great thanks.
/**
* Check if tile is next to open space
*/
public void check()
{
if (isTouching(Blank.class))
{
int x1= Blank.getX();
int y1= Blank.getY();
int x2= getX;
int y2= getY;
setLocation(x1,y1);
Blank.setLocation(x2,y2);
}

