private Node < ColumnName > advance ( int goalRow ) { ColumnHeader < ColumnName > col = findBestColumn ( ) ; if ( col . size > 0 ) { coverColumn ( col ) ; Node < ColumnName > row = col . down ; int id = 0 ; while ( row != col ) { if ( id == goalRow ) { Node < ColumnName > node = row . right ; while ( node != row ) { coverColumn ( node . head ) ; node = node . right ; } return row ; } id += 1 ; row = row . down ; } } return null ; }
Make one move from a prefix