Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ImageCoW(){
- cout << Tile::GetInstanceCount() << endl;
- auto side = Tile::SIZE;
- const Size size{side * 2 + 3, side * 2 + 5};
- const char color = 'g';
- Image img(size, color);
- cout << Tile::GetInstanceCount() << endl;
- char new_color = 'n';
- img.SetPixel({0, 0}, new_color);
- cout << Tile::GetInstanceCount() << endl;
- img.SetPixel({1, 1}, new_color);
- cout << Tile::GetInstanceCount() << endl;
- img.SetPixel({side + 2, 0}, new_color);
- cout << Tile::GetInstanceCount() << endl;
- img.SetPixel({0, side + 2}, new_color);
- cout << Tile::GetInstanceCount() << endl;
- img.SetPixel({side + 3, side + 2}, new_color);
- cout << Tile::GetInstanceCount() << endl;
- Image img2 = img;
- cout << Tile::GetInstanceCount() << endl;
- img2.SetPixel({side + 1, side + 1}, new_color);
- cout << Tile::GetInstanceCount() << endl;
- Print(img, cout);
- Print(img2, cout);
- }
- 0
- 1
- 2
- 2
- 3
- 4
- 5
- 5
- 6
- ngggggggggngggggggg
- gnggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- nggggggggggnggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ngggggggggngggggggg
- gnggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- gggggggggnggggggggg
- nggggggggggnggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
- ggggggggggggggggggg
Add Comment
Please, Sign In to add comment