Esempio n. 1
0
    @Override
    public boolean test(Node node) {
      V pos = (V) node.getState();
      for (GameObject go : board.at(pos)) {
        if (go instanceof Fountain) {
          if (((Fountain) go).lastVisitedBy != me.id) return true;
        }
      }

      return false;
    }
Esempio n. 2
0
    @Override
    public boolean test(Node currentNode) {
      V currentUnicornPos = (V) currentNode.getState();
      for (V d : Board.getDirections()) {
        for (GameObject obj : board.at(V.add(currentUnicornPos, d))) {
          if (obj instanceof Cloud) {
            return true;
          }
        }
      }

      return false;
    }