question: addfish places a fish in cell x , y if the cell is empty . if the cell is already occupied , leave the cell as it is . concode_field_sep int EMPTY concode_elem_sep int FISH concode_elem_sep int SHARK concode_elem_sep int starveTime concode_elem_sep int width concode_elem_sep Animal[][] gridData concode_elem_sep int height concode_field_sep int starveTime concode_elem_sep int[] animalAround concode_elem_sep void sharkUpdate concode_elem_sep void fishUpdate concode_elem_sep void main concode_elem_sep void addShark concode_elem_sep void addShark concode_elem_sep int cellContents concode_elem_sep int[] checkOffGrid concode_elem_sep int sharkFeeding concode_elem_sep Ocean timeStep concode_elem_sep int width concode_elem_sep void emptyUpdate concode_elem_sep int height
target: void function ( int arg0 , int arg1 ) { int [ ] loc0 = checkOffGrid ( arg0 , arg1 ) ; if ( gridData [ loc0 [ 0 ] ] [ loc0 [ 1 ] ] == null ) { gridData [ loc0 [ 0 ] ] [ loc0 [ 1 ] ] = new Animal ( 2 ) ; } }