Adding Pieces positions
This commit is contained in:
@ -9,6 +9,7 @@ package school_project;
|
||||
public class Piece extends Shape{
|
||||
|
||||
private Vec2 Position;
|
||||
private Map linked_map;
|
||||
|
||||
public Piece() {
|
||||
super();
|
||||
@ -22,7 +23,21 @@ public class Piece extends Shape{
|
||||
return Position;
|
||||
}
|
||||
|
||||
public void getPo
|
||||
public void setPosition(Vec2 position){
|
||||
if (linked_map == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.Position = position;
|
||||
}
|
||||
|
||||
/**
|
||||
* set the map the piece is into the the map argument
|
||||
* @param map map where to place the piece
|
||||
*/
|
||||
public void setLinked_map(Map map){
|
||||
this.linked_map = map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotate the matrix of the piece. Used when the player right click
|
||||
|
Reference in New Issue
Block a user