public final void returnMoveList(ArrayList<Move> moveList){
  if (movesInCache + moveList.size() <= moveCache.length) {
    int mlSize=moveList.size();
    for (int mi=0; mi < mlSize; mi++) {
      moveCache[movesInCache++]=moveList.get(mi);
    }
  }
  moveList.clear();
  if (moveListsInCache < moveListCache.length) {
    moveListCache[moveListsInCache++]=moveList;
  }
}

public final void returnMoveList ( ArrayList < Move > moveList ) { if ( movesInCache + moveList . size ( ) <= moveCache . length ) { int mlSize = moveList . size ( ) ; for ( int mi = 0 ; mi < mlSize ; mi ++ ) { moveCache [ movesInCache ++ ] = moveList . get ( mi ) ; } } moveList . clear ( ) ; if ( moveListsInCache < moveListCache . length ) { moveListCache [ moveListsInCache ++ ] = moveList ; } }
return all move objects in movelist to the move cache .
