Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.30 KB | None | 0 0
  1. public boolean neighborIsCalm() {
  2.         Grid<Actor> grid = getGrid();
  3.         Location neighborLocation = getLocation().getAdjacentLocation(getDirection());
  4.         return (grid.isValid(neighborLocation) || grid.get(neighborLocation) instanceof Rock || grid.get(neighborLocation) instanceof Flower);
  5.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement