dev #12
@@ -45,6 +45,13 @@ public class World implements Closeable{
|
|||||||
setPieceCoords(null, move.getStart());
|
setPieceCoords(null, move.getStart());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ejectPiece(Coordinate coordinate) {
|
||||||
|
PieceEntity entity = getPiece(coordinate);
|
||||||
|
assert entity != null;
|
||||||
|
this.entites.remove(entity);
|
||||||
|
setPieceCoords(null, coordinate);
|
||||||
|
}
|
||||||
|
|
||||||
public PieceEntity getPiece(Coordinate coordinate) {
|
public PieceEntity getPiece(Coordinate coordinate) {
|
||||||
return pieces[coordinate.toIndex()];
|
return pieces[coordinate.toIndex()];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user