aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2016-05-05 12:56:07 +0200
committerPacien TRAN-GIRARD2016-05-05 12:56:07 +0200
commite233177e85aadfd156947113f068ceb97e9d365c (patch)
tree88146e6f0f08c2b073d01f47401db084f4d5f4a4
parentf3c51f3143679521462d6a25055ac6629a0d23d3 (diff)
downloadxblast-e233177e85aadfd156947113f068ceb97e9d365c.tar.gz
Refactor explosion arm sequence building
-rw-r--r--src/ch/epfl/xblast/server/Bomb.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ch/epfl/xblast/server/Bomb.java b/src/ch/epfl/xblast/server/Bomb.java
index 57c271f..ebbe8e3 100644
--- a/src/ch/epfl/xblast/server/Bomb.java
+++ b/src/ch/epfl/xblast/server/Bomb.java
@@ -93,9 +93,8 @@ public final class Bomb {
93 * @param dir the Direction of the arm 93 * @param dir the Direction of the arm
94 */ 94 */
95 private Sq<Sq<Cell>> explosionArmTowards(Direction dir) { 95 private Sq<Sq<Cell>> explosionArmTowards(Direction dir) {
96 return Sq 96 Sq<Cell> explosionArm = Sq.iterate(position, position -> position.neighbor(dir)).limit(range);
97 .constant(Sq.iterate(position, position -> position.neighbor(dir)).limit(range)) 97 return Sq.repeat(Ticks.EXPLOSION_TICKS, explosionArm);
98 .limit(Ticks.EXPLOSION_TICKS);
99 } 98 }
100 99
101 /** 100 /**