g.drawRect((int) dimensions.getX(), (int) dimensions.getY(), (int) dimensions.getWidth(), (int) dimensions
.getHeight());
}
public Point getExpectedSlot(Direction d) {
Direction slot = new HumanAlwaysOnBottom(human).mapRelativeTo(d);
if (slot.equals(South.i())) {
return new Point((int) (dimensions.getX() + dimensions.getWidth() / 2 - CardPanel.IMAGE_WIDTH / 2),
(int) (dimensions.getY() + dimensions.getHeight() - CardPanel.IMAGE_HEIGHT));
} else if (slot.equals(West.i())) {
return new Point((int) dimensions.getX(),
(int) (dimensions.getY() + dimensions.getHeight() / 2 - CardPanel.IMAGE_HEIGHT / 2));
} else if (slot.equals(North.i())) {
return new Point((int) (dimensions.getX() + dimensions.getWidth() / 2 - CardPanel.IMAGE_WIDTH / 2),
(int) dimensions.getY());
} else if (slot.equals(East.i())) {
return new Point((int) (dimensions.getX() + dimensions.getWidth() - CardPanel.IMAGE_WIDTH),
(int) (dimensions.getY() + dimensions.getHeight() / 2 - CardPanel.IMAGE_HEIGHT / 2));
}
return null;
}