aboutsummaryrefslogtreecommitdiff
path: root/src/ch/epfl
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2016-04-14 16:06:27 +0200
committerPacien TRAN-GIRARD2016-04-14 16:06:27 +0200
commit97b23f67fbbbd1c1d0f69427ea2a629103146f58 (patch)
tree08837d31d6f90e7ca724ec1442c673b3985c6b59 /src/ch/epfl
parent7ff603fe5ca53195881cec8a691fe2b095cf9e12 (diff)
downloadxblast-97b23f67fbbbd1c1d0f69427ea2a629103146f58.tar.gz
Generate toString methods for debugging
Diffstat (limited to 'src/ch/epfl')
-rw-r--r--src/ch/epfl/xblast/server/Bomb.java10
-rw-r--r--src/ch/epfl/xblast/server/Player.java16
2 files changed, 26 insertions, 0 deletions
diff --git a/src/ch/epfl/xblast/server/Bomb.java b/src/ch/epfl/xblast/server/Bomb.java
index 9a3fa63..a99a8cb 100644
--- a/src/ch/epfl/xblast/server/Bomb.java
+++ b/src/ch/epfl/xblast/server/Bomb.java
@@ -134,4 +134,14 @@ public final class Bomb {
134 .collect(Collectors.toList()); 134 .collect(Collectors.toList());
135 } 135 }
136 136
137 @Override
138 public String toString() {
139 return "Bomb{" +
140 "ownerId=" + ownerId +
141 ", position=" + position +
142 ", fuseLengths=" + fuseLengths +
143 ", range=" + range +
144 '}';
145 }
146
137} 147}
diff --git a/src/ch/epfl/xblast/server/Player.java b/src/ch/epfl/xblast/server/Player.java
index e8f3145..414be71 100644
--- a/src/ch/epfl/xblast/server/Player.java
+++ b/src/ch/epfl/xblast/server/Player.java
@@ -70,6 +70,14 @@ public final class Player {
70 return this.state() == State.INVULNERABLE || this.state() == State.VULNERABLE; 70 return this.state() == State.INVULNERABLE || this.state() == State.VULNERABLE;
71 } 71 }
72 72
73 @Override
74 public String toString() {
75 return "LifeState{" +
76 "lives=" + lives +
77 ", state=" + state +
78 '}';
79 }
80
73 } 81 }
74 82
75 /** 83 /**
@@ -146,6 +154,14 @@ public final class Player {
146 return new DirectedPosition(this.position(), newDirection); 154 return new DirectedPosition(this.position(), newDirection);
147 } 155 }
148 156
157 @Override
158 public String toString() {
159 return "DirectedPosition{" +
160 "position=" + position +
161 ", direction=" + direction +
162 '}';
163 }
164
149 } 165 }
150 166
151 /** 167 /**