public void addPointToTail ( int x , int y ) { int index = tail . start + tail . length * 2 ; int block [ ] ; int blockIndex = tail . block + index / blockLength ; if ( blockIndex == blocks . size ) { tailBlockSize = 0 ; block = blocks . grow ( ) ; } else { block = blocks . get ( blockIndex ) ; } tailBlockSize += 2 ; index %= blockLength ; block [ index ] = x ; block [ index + 1 ] = y ; tail . length += 1 ; }
Adds a point to the tail point set