PIbd-21 Potapov N.S. LabWork02 Hard #2
39
ProjectStormtrooper/ObjectParameters.java
Normal file
39
ProjectStormtrooper/ObjectParameters.java
Normal file
@ -0,0 +1,39 @@
|
||||
package ProjectStormtrooper;
|
||||
|
||||
public class ObjectParameters {
|
||||
private int _x;
|
||||
private int _y;
|
||||
private int _width;
|
||||
private int _height;
|
||||
|
||||
public int LeftBorder() {
|
||||
return _x;
|
||||
}
|
||||
|
||||
public int TopBorder() {
|
||||
return _y;
|
||||
}
|
||||
|
||||
public int RightBorder() {
|
||||
return _x + _width;
|
||||
}
|
||||
|
||||
public int DownBorder() {
|
||||
return _y + _height;
|
||||
}
|
||||
|
||||
public int ObjectMiddleHorizontal() {
|
||||
return _x + _width / 2;
|
||||
}
|
||||
|
||||
public int ObjectMiddleVertical() {
|
||||
return _y + _height / 2;
|
||||
}
|
||||
|
||||
public ObjectParameters(int x, int y, int width, int height) {
|
||||
_x = x;
|
||||
_y = y;
|
||||
_width = width;
|
||||
_height = height;
|
||||
}
|
||||
}
|
7
ProjectStormtrooper/Status.java
Normal file
7
ProjectStormtrooper/Status.java
Normal file
@ -0,0 +1,7 @@
|
||||
package ProjectStormtrooper;
|
||||
|
||||
public enum Status {
|
||||
NotInit,
|
||||
InProgress,
|
||||
Finish
|
||||
}
|
Loading…
Reference in New Issue
Block a user