From e233177e85aadfd156947113f068ceb97e9d365c Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Thu, 5 May 2016 12:56:07 +0200 Subject: Refactor explosion arm sequence building --- src/ch/epfl/xblast/server/Bomb.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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 { * @param dir the Direction of the arm */ private Sq> explosionArmTowards(Direction dir) { - return Sq - .constant(Sq.iterate(position, position -> position.neighbor(dir)).limit(range)) - .limit(Ticks.EXPLOSION_TICKS); + Sq explosionArm = Sq.iterate(position, position -> position.neighbor(dir)).limit(range); + return Sq.repeat(Ticks.EXPLOSION_TICKS, explosionArm); } /** -- cgit v1.2.3