public FreeCellNode next(){
  String line=sc.nextLine();
  StringTokenizer st=new StringTokenizer(line,"., ");
  int val=Integer.valueOf(st.nextToken());
  if (val != deal) {
    throw new NoSuchElementException("Deal number (" + deal + ") seems missing from input file for DealIterator.");
  }
  int[] deals=new int[52];
  int idx=0;
  while (st.hasMoreTokens()) {
    deals[idx++]=Integer.valueOf(st.nextToken());
  }
  deal++;
  return Deal.initialize(deals);
}

public FreeCellNode next ( ) { String line = sc . nextLine ( ) ; StringTokenizer st = new StringTokenizer ( line , "., " ) ; int val = Integer . valueOf ( st . nextToken ( ) ) ; if ( val != deal ) { throw new NoSuchElementException ( "Deal number (" + deal + ") seems missing from input file for DealIterator." ) ; } int [ ] deals = new int [ 52 ] ; int idx = 0 ; while ( st . hasMoreTokens ( ) ) { deals [ idx ++ ] = Integer . valueOf ( st . nextToken ( ) ) ; } deal ++ ; return Deal . initialize ( deals ) ; }
get the next deal .
