@ -1,8 +1,15 @@
|
||||
package school_project;
|
||||
|
||||
/**
|
||||
* Represent a Piece in the game.
|
||||
* Every Piece should be contained in a Map Object.
|
||||
* A piece has a position witch is the position of its top-leftest position in its matrix.
|
||||
* If the piece is not placed in the Map (in a floating state) the position should be null;
|
||||
*/
|
||||
public class Piece extends Shape{
|
||||
|
||||
private int x,y; // Position in the Map Object
|
||||
private Vec2 Position;
|
||||
|
||||
public Piece() {
|
||||
super();
|
||||
}
|
||||
@ -11,6 +18,12 @@ public class Piece extends Shape{
|
||||
super(matrix);
|
||||
}
|
||||
|
||||
public Vec2 getPosition() {
|
||||
return Position;
|
||||
}
|
||||
|
||||
public void getPo
|
||||
|
||||
/**
|
||||
* Rotate the matrix of the piece. Used when the player right click
|
||||
*
|
||||
|
Reference in New Issue
Block a user