-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCommons.java
73 lines (62 loc) · 1.23 KB
/
Commons.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
The Commons class contains all
the variables which
are used by several classes. Screen
height and width are not set as constants because
content pane of the JFrame depend on the
Operating System running the program.
*/
public class Commons
{
private int brickWidth = 38;
private int brickHeight = 7;
private int paddleWidth = 60;
private int paddleHeight = 8;
private int width = 300;
private int height = 400;
private boolean inGame = false;
public int getHeight()
{
return height;
}
public int getWidth()
{
return width;
}
public void setHeight(int newHeight)
{
height = newHeight;
}
public void setWidth(int newWidth)
{
width = newWidth;
}
public int getBWidth()
{
return brickWidth;
}
public void setBWidth(int bWidth_)
{
brickWidth = bWidth_;
}
public int getBHeight()
{
return brickHeight;
}
public int getPWidth()
{
return paddleWidth;
}
public int getPHeight()
{
return paddleHeight;
}
public boolean getInGame()
{
return inGame;
}
public void setInGame(boolean a)
{
inGame = true;
}
}