Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. #include "Bridges.h"
  7. #include "Color.h"
  8. #include "ColorGrid.h"
  9.  
  10.  
  11. using namespace bridges;
  12.  
  13. int main() {
  14. // BRIDGES initializations
  15.  
  16. Bridges *bridges = new Bridges (YOUR_ASSIGNMENT_NUMBER, "YOUR_USER_ID", "YOUR_API_KEY");
  17. bridges->setTitle("A Color Grid Example");
  18.  
  19. // create a color grid
  20. ColorGrid *cg = new ColorGrid(500, 500, Color("red"));
  21.  
  22. // draw a green square
  23. for (int k = 75; k < 150; k++)
  24. for (int j = 75; j < 150; j++)
  25. cg->set(k, j, Color("green"));
  26.  
  27.  
  28. bridges->setDataStructure(cg);
  29. bridges->visualize();
  30.  
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement