Advertisement
fosterbl

PongProcessing1Tester

Feb 24th, 2020
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.78 KB | None | 0 0
  1. void setup() {
  2.   size(640, 480);
  3.  
  4.   Block one = new Block();
  5.   System.out.println(one);
  6.  
  7.   Block two = new Block(50, 50, 30, 30);
  8.   System.out.println(two);
  9.  
  10.   Block three = new Block(350, 350, 15, 15, color(255, 0, 0));
  11.   System.out.println(three);
  12.  
  13.   Block four = new Block(450, 50, 20, 60, color(0, 255, 0));
  14.   System.out.println(four);
  15.  
  16.   System.out.println(one.equals(two));
  17.   System.out.println(one.equals(one));
  18. }
  19.  
  20. void draw() {
  21.   background(255);
  22.   Block one = new Block();
  23.   one.display();
  24.  
  25.   Block two = new Block(50, 50, 30, 30);
  26.   two.display();
  27.  
  28.   Block three = new Block(350, 350, 15, 15, color(255, 0, 0));
  29.   three.display();
  30.  
  31.   Block four = new Block(450, 50, 20, 60, color(0, 255, 0));
  32.   four.display();
  33.  
  34.   //add more test cases as necessary
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement