EpicKnarvik97 a6a0045786 Flytter ting til korrekte pakker og forbedrer Tile og Wall
Fikser kommentarer, mellomrom og variabelnavn i Tile og Wall
Flytter IGrid, Robot og Wall til objects
Flytter tester til korresponderende pakker
2020-02-20 13:12:18 +01:00

44 lines
1.1 KiB
Java

package inf112.fiasko.roborally.objects;
import inf112.fiasko.roborally.element_properties.Position;
/**
* this class represents a robot
*/
public class Robot {
private int robotDamageTaken = 0;
private int playerId; //might not be needed
private boolean inPowerDown = false;
private int lastFlagVisited = 0;
private Position backupPosition;
private Position currentPosition;
public Robot (int playerId, Position spawnPosition){
this.playerId=playerId;
this.backupPosition = spawnPosition;
this.currentPosition = spawnPosition;
}
public int getDamage(){
return robotDamageTaken;
}
public void setDamage (int damage){
this.robotDamageTaken = damage;
}
public Position getPosition(){
return currentPosition;
}
public void setPosition( Position newPosition ){
this.currentPosition = newPosition;
}
public void setPowerDown(Boolean powerDownStatus){
this.inPowerDown = powerDownStatus;
}
public Boolean isInPowerDown(){
return inPowerDown;
}
}