Example #1
0
 /** Returns value > 0 if lift is reachable. */
 public static int liftReachable(Board board, int liftx, int lifty) {
   Cell up = board.get(liftx, lifty + 1);
   Cell down = board.get(liftx, lifty - 1);
   Cell left = board.get(liftx - 1, lifty);
   Cell right = board.get(liftx + 1, lifty);
   return cell2int(up) + cell2int(down) + cell2int(left) + cell2int(right);
 }