Refactored Player and PlayerBase ctors
This commit is contained in:
parent
1a23abbe47
commit
7b531fecdd
@ -8,10 +8,9 @@ public class Player extends PlayerBase {
|
|||||||
private Box boxLifted;
|
private Box boxLifted;
|
||||||
|
|
||||||
|
|
||||||
public Player(Tile startTile, Direction startDirection) {
|
public Player(String name, Tile startTile, Direction startDirection) {
|
||||||
|
super(name, startTile, startDirection);
|
||||||
zpmContainer = new ArrayList<>();
|
zpmContainer = new ArrayList<>();
|
||||||
currentTile = startTile;
|
|
||||||
facingDirection = startDirection; /* Be lehetne állítani egy defaultot is, nem tudom, mennyire kéne */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void boxLift() {
|
public void boxLift() {
|
||||||
|
@ -4,6 +4,13 @@ public class PlayerBase implements Destroyable {
|
|||||||
protected Game game;
|
protected Game game;
|
||||||
protected Tile currentTile;
|
protected Tile currentTile;
|
||||||
protected Direction facingDirection;
|
protected Direction facingDirection;
|
||||||
|
protected String name;
|
||||||
|
|
||||||
|
public PlayerBase(String name, Tile startTile, Direction startDirection) {
|
||||||
|
this.name = name;
|
||||||
|
currentTile = startTile;
|
||||||
|
facingDirection = startDirection;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
|
Loading…
Reference in New Issue
Block a user