diff --git a/cs654/final-proj/Player.java b/cs654/final-proj/Player.java index 3d7c325..4ff3a64 100644 --- a/cs654/final-proj/Player.java +++ b/cs654/final-proj/Player.java @@ -19,6 +19,8 @@ public class Player extends GameItem implements Cloneable this.radius = DEFAULT_RADIUS; this.health = 1.0; this.r = Math.random() * Math.PI * 2; + this.x = 0; /* will be assigned by world */ + this.y = 0; /* will be assigned by world */ this.dr = 0; this.dx = 0; this.dy = 0; @@ -30,6 +32,8 @@ public class Player extends GameItem implements Cloneable p.radius = radius; p.health = health; p.r = r; + p.x = x; + p.y = y; p.dr = dr; p.dx = dx; p.dy = dy; @@ -44,7 +48,9 @@ public class Player extends GameItem implements Cloneable this.r == other.r && this.dr == other.dr && this.dx == other.dx && - this.dy == other.dy; + this.dy == other.dy && + this.x == other.x && + this.y == other.y; } public String toString()