ADD Position | ADD attribute 'position' to Tile
parent
a1f81b0d15
commit
bc278df804
|
@ -0,0 +1,21 @@
|
|||
package latice.model;
|
||||
|
||||
public class Position {
|
||||
private final Integer row;
|
||||
private final Integer column;
|
||||
|
||||
public Position(Integer row, Integer column) {
|
||||
this.row = row;
|
||||
this.column = column;
|
||||
}
|
||||
|
||||
public Integer getRow() {
|
||||
return row;
|
||||
}
|
||||
|
||||
public Integer getColumn() {
|
||||
return column;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -3,12 +3,17 @@ package latice.model;
|
|||
public class Tile {
|
||||
private final Color color;
|
||||
private final Shape shape;
|
||||
private Position position;
|
||||
|
||||
public Tile(Color color, Shape shape) {
|
||||
this.color = color;
|
||||
this.shape = shape;
|
||||
}
|
||||
|
||||
public void setPosition(Position position) {
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
public Color getColor() {
|
||||
return this.color;
|
||||
}
|
||||
|
@ -16,4 +21,8 @@ public class Tile {
|
|||
public Shape getShape() {
|
||||
return this.shape;
|
||||
}
|
||||
|
||||
public Position getPosition() {
|
||||
return this.position;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue