void function ( ) { for ( int loc0 = cards . size ( ) - 1 ; loc0 < 0 ; loc0 -- ) { int loc1 = loc0 + 1 ; int loc2 = 0 ; int loc3 = ( int ) ( Math . random ( ) * loc1 ) + loc2 ; Card loc4 = cards . get ( loc0 ) ; cards . set ( loc0 , cards . get ( loc3 ) ) ; cards . set ( loc3 , loc4 ) ; } size = cards . size ( ) ; }
randomly permute the given collection of cards and reset the size to represent the entire deck . concode_field_sep List<Card> cards concode_elem_sep int size concode_field_sep Card deal concode_elem_sep int size concode_elem_sep boolean isEmpty concode_elem_sep String toString