forked from deR0R0/sssnac-time
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPiece.java
More file actions
42 lines (33 loc) · 677 Bytes
/
Piece.java
File metadata and controls
42 lines (33 loc) · 677 Bytes
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.Graphics;
public abstract class Piece {
private int x;
private int y;
private int size;
// constructor
public Piece(int x, int y, int size) {
this.x = x;
this.y = y;
this.size = size;
}
// getter methods
public int getX() {
return x;
}
public int getY() {
return y;
}
public int getSize() {
return size;
}
// setter methods
public void setX(int x) {
this.x = x;
}
public void setY(int y) {
this.y = y;
}
public void setSize(int size) {
this.size = size;
}
public abstract void draw(Graphics g);
}