private static ArrayList<T3Board> directlyReachableStates(T3Board board) {
    ArrayList<T3Board> drs = new ArrayList<T3Board>();

    // look for reachable states
    for (int row = 1; row <= 3; row++) {
      for (int col = 1; col <= 3; col++) {
        T3Board next = new T3Board(board);
        // if space is available, mark it
        if (next.markSpace(row, col, T3Board.X)) {
          // switch X and O in next stage, so the agent is always X
          next.switchSeats();
          // add it to the list
          drs.add(next);
        }
      }
    }
    return drs;
  }