Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Plansza::changeInArray(Plansza&Array)
- {
- Komorka ***tmp;
- tmp = new Komorka**[counterColumns];
- for (int i = 0; i < counterLines; ++i)
- {
- tab[i] = new Komorka*[counterLines];
- }
- for(int i=0;i<getLines();i++)
- {
- for(int j=0;j<getColumns();j++)
- {
- (Array.tab[i][j])->nextFrame(Array,tmp,i,j);
- }
- }
- copyArray(tmp);
- }
- void Plansza::copyArray(Komorka ***tmp)
- {
- for(int i=0;i<counterLines;i++)
- {
- for(int j=0;j<counterColumns;j++)
- {
- tab[i][j]=tmp[i][j];
- }
- delete [] tmp[i];
- }
- delete [] tmp;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement