void update(Boat boats[], Fish *fishes, int *fishesInCell,double dt){ // This should all be separate for each of the processes // So one process each for each of the cells, // and a process each for the captains. for(int j = 0; j < GRIDCELLS; j++){ for(int i =0; i < fishesInCell[j];i++){ updateFish(boats,&fishes[FISHCOORD(j,i)],dt); } } for(int i = 0; i < NUMBOATS; i++){ updateBoat(&boats[i]); } }
void updateMap(){ short x = 0; short y = 0; #pragma omp parallel for for( x=0; x < COLUMNS; x++) for( y=0; y < ROWS; y++) map[x][y].m_updated = false; updateSharks(); updateFish(); }