-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathArena.java
42 lines (29 loc) · 943 Bytes
/
Arena.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import java.awt.*;
public class Arena {
Rect ltSide = new Rect(0, 150, 250, 550);
Rect rtSide = new Rect(750, 150, 250, 550);
Rect bottom = new Rect(250,650,500,50);
public Arena(){
}
public void draw(Graphics g){
ltSide.draw(g);
rtSide.draw(g);
bottom.draw(g);
// g.setColor(Color.red);
// g.drawLine(300,150,300,650);
// g.drawLine(350,150,350,650);
// g.drawLine(400,150,400,650);
// g.drawLine(450,150,450,650);
// g.drawLine(500,150,500,650);
// g.drawLine(550,150,550,650);
// g.drawLine(600,150,600,650);
// g.drawLine(650,150,650,650);
// g.drawLine(700,150,700,650);
// g.setColor(Color.black);
g.drawString("¡TETRIS!",500, 50);
}
public boolean overlaps(Block b){
if(b.btEdge >= 650 || b.rtEdge >= 750 || b.ltEdge <= 250) return true;
else return false;
}
}