-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTile.java
More file actions
32 lines (28 loc) · 703 Bytes
/
Tile.java
File metadata and controls
32 lines (28 loc) · 703 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
public abstract class Tile {
// ATTRIBUTES
private int row;
private int column;
private String display = null;
// CONSTRUCTOR
public Tile(int row, int col) {
this.row = row;
this.column = col;
}
// GETTERS + SETTERS
public int getRow() { return this.row;}
public int getColumn() { return this.column;}
public String getDisplay() {
return this.display;
}
public void setDisplay(String display) {
this.display = display;
}
// OPERATION
public String printDisplay() {
if (this.getDisplay() == null) {
return " ";
} else {
return this.getDisplay();
}
}
}