diff options
author | Pacien TRAN-GIRARD | 2016-05-05 12:56:07 +0200 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2016-05-05 12:56:07 +0200 |
commit | e233177e85aadfd156947113f068ceb97e9d365c (patch) | |
tree | 88146e6f0f08c2b073d01f47401db084f4d5f4a4 /src/ch | |
parent | f3c51f3143679521462d6a25055ac6629a0d23d3 (diff) | |
download | xblast-e233177e85aadfd156947113f068ceb97e9d365c.tar.gz |
Refactor explosion arm sequence building
Diffstat (limited to 'src/ch')
-rw-r--r-- | src/ch/epfl/xblast/server/Bomb.java | 5 |
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 | /** |