From 6fce0de00ac7c09d3da32003522c9d157b575c7e Mon Sep 17 00:00:00 2001 From: josh Date: Sun, 13 Apr 2008 20:27:55 +0000 Subject: [PATCH] changes in x and y affecting Players equality properly git-svn-id: svn://anubis/gvsu@99 45c1a28c-8058-47b2-ae61-ca45b979098e --- cs654/final-proj/Player.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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()