changes in x and y affecting Players equality properly

git-svn-id: svn://anubis/gvsu@99 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh 2008-04-13 20:27:55 +00:00
parent 45611181de
commit 6fce0de00a

View File

@ -19,6 +19,8 @@ public class Player extends GameItem implements Cloneable
this.radius = DEFAULT_RADIUS; this.radius = DEFAULT_RADIUS;
this.health = 1.0; this.health = 1.0;
this.r = Math.random() * Math.PI * 2; 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.dr = 0;
this.dx = 0; this.dx = 0;
this.dy = 0; this.dy = 0;
@ -30,6 +32,8 @@ public class Player extends GameItem implements Cloneable
p.radius = radius; p.radius = radius;
p.health = health; p.health = health;
p.r = r; p.r = r;
p.x = x;
p.y = y;
p.dr = dr; p.dr = dr;
p.dx = dx; p.dx = dx;
p.dy = dy; p.dy = dy;
@ -44,7 +48,9 @@ public class Player extends GameItem implements Cloneable
this.r == other.r && this.r == other.r &&
this.dr == other.dr && this.dr == other.dr &&
this.dx == other.dx && this.dx == other.dx &&
this.dy == other.dy; this.dy == other.dy &&
this.x == other.x &&
this.y == other.y;
} }
public String toString() public String toString()