Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup() {
- size(640, 480);
- Block one = new Block();
- System.out.println(one);
- Block two = new Block(50, 50, 30, 30);
- System.out.println(two);
- Block three = new Block(350, 350, 15, 15, color(255, 0, 0));
- System.out.println(three);
- Block four = new Block(450, 50, 20, 60, color(0, 255, 0));
- System.out.println(four);
- System.out.println(one.equals(two));
- System.out.println(one.equals(one));
- }
- void draw() {
- background(255);
- Block one = new Block();
- one.display();
- Block two = new Block(50, 50, 30, 30);
- two.display();
- Block three = new Block(350, 350, 15, 15, color(255, 0, 0));
- three.display();
- Block four = new Block(450, 50, 20, 60, color(0, 255, 0));
- four.display();
- //add more test cases as necessary
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement