Added possibility to change player from human to ghost
This commit is contained in:
parent
3151cd4c51
commit
5b3af54720
@ -0,0 +1,14 @@
|
|||||||
|
package ch.unibas.dmi.dbis.cs108.gamelogic;
|
||||||
|
|
||||||
|
import ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur.Passenger;
|
||||||
|
|
||||||
|
public class GhostifyHandler {
|
||||||
|
/**
|
||||||
|
* Changes passenger at position x to ghost
|
||||||
|
* @param p
|
||||||
|
* Passenger to be ghostified
|
||||||
|
*/
|
||||||
|
public void ghostify(Passenger p) {
|
||||||
|
p.setGhost();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -52,6 +52,11 @@ public class Passenger {
|
|||||||
this.kickedOff = kickedOff;
|
this.kickedOff = kickedOff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setGhost() {
|
||||||
|
// changes this passenger's status from human to ghost
|
||||||
|
isGhost = true;
|
||||||
|
}
|
||||||
|
|
||||||
public int getPosition() {
|
public int getPosition() {
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user