int function ( Piece arg0 , int arg1 ) { int loc0 = 0 , loc1 = 0 ; int [ ] loc2 = arg0 . getSkirt ( ) ; while ( loc1 < loc2 . length ) { int loc3 = heights [ arg1 + loc1 ] ; if ( loc0 < - ( loc2 [ loc1 ] - loc3 ) ) { loc0 = - ( loc2 [ loc1 ] - loc3 ) ; } loc1 ++ ; } return loc0 ; }
given a piece and an x , returns the y value where the piece would come to rest if it were dropped straight down at that x. implementation : use the skirt and the col heights to compute this fast -- o skirt length . concode_field_sep int PLACE_OUT_BOUNDS concode_elem_sep boolean committed concode_elem_sep int[] widths concode_elem_sep int[] widthsBackup concode_elem_sep boolean DEBUG concode_elem_sep int maxHeight concode_elem_sep int[] heights concode_elem_sep boolean[][] grid concode_elem_sep int PLACE_OK concode_elem_sep int width concode_elem_sep int[] heightsBackup concode_elem_sep int PLACE_ROW_FILLED concode_elem_sep int PLACE_BAD concode_elem_sep boolean[][] gridBackup concode_elem_sep int height concode_field_sep void backup concode_elem_sep boolean getGrid concode_elem_sep boolean checkBad concode_elem_sep void commit concode_elem_sep boolean checkMaxHeight concode_elem_sep int getWidth concode_elem_sep int getColumnHeight concode_elem_sep int getHeight concode_elem_sep void undo concode_elem_sep boolean checkWidths concode_elem_sep int clearRows concode_elem_sep boolean checkHeights concode_elem_sep String toString concode_elem_sep void sanityCheck concode_elem_sep int place concode_elem_sep void computeWidthsAndHeights concode_elem_sep int getRowWidth concode_elem_sep void computeMaxHeight concode_elem_sep boolean checkOutBounds concode_elem_sep int getMaxHeight