code: private static List<Integer> applyActionToState(Action action, List<Integer> board) {
          // We copy the original board and we swap the 0 (empty tile) with the corresponding
          // tile, depending on the action to apply.
          List<Integer> successor = new ArrayList<Integer>(board);
          int tileToSwap = 0;
          switch (action){
              case UP:
                  tileToSwap = board.indexOf(0) - 3;
                  break;
              case DOWN:
                  tileToSwap = board.indexOf(0) + 3;
                  break;
              case LEFT:
                  tileToSwap = board.indexOf(0) - 1;
                  break;
              case RIGHT:
                  tileToSwap = board.indexOf(0) + 1;
                  break;
          }
          successor.set(board.indexOf(0), board.get(tileToSwap));
          successor.set(tileToSwap, 0);
          return successor;
      }
docs: Generates a new state that results from applying action Action to the state State.
  Example: {5,4,0,7,2,6,8,1,3} x LEFT -> {5,0,4,7,2,6,8,1,3}
  
  @param action action to apply (UP, DOWN, LEFT, RIGHT)
  @param board List of integers that represents the board
  @return new state