diff options
author | Timothée Floure | 2016-03-31 13:07:11 +0200 |
---|---|---|
committer | Timothée Floure | 2016-03-31 13:07:11 +0200 |
commit | 54cd144e8a070e4b89baa86361db95280939d001 (patch) | |
tree | 617f366a726b38f19e182e76e8f9cd785a56763c /src | |
parent | a5f3aa729dfad19f3979b01f0a6f9916ac968698 (diff) | |
download | xblast-54cd144e8a070e4b89baa86361db95280939d001.tar.gz |
Remove (useless ?) cast to HasSet in GameState/nextBoard
Diffstat (limited to 'src')
-rw-r--r-- | src/ch/epfl/xblast/server/GameState.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ch/epfl/xblast/server/GameState.java b/src/ch/epfl/xblast/server/GameState.java index 4b00c3e..32edf5d 100644 --- a/src/ch/epfl/xblast/server/GameState.java +++ b/src/ch/epfl/xblast/server/GameState.java | |||
@@ -126,9 +126,9 @@ public final class GameState { | |||
126 | for (Sq<Block> blockSq : blocks0) { | 126 | for (Sq<Block> blockSq : blocks0) { |
127 | int cellId = blocks0.get(i).hashCode(); | 127 | int cellId = blocks0.get(i).hashCode(); |
128 | Block block = blockSq.head(); | 128 | Block block = blockSq.head(); |
129 | if (((HashSet) consumedBonuses).contains(cellId) && block.isBonus()) { | 129 | if (( consumedBonuses).contains(cellId) && block.isBonus()) { |
130 | blocks1.add(Sq.constant(Block.FREE)); | 130 | blocks1.add(Sq.constant(Block.FREE)); |
131 | } else if (((HashSet) blastedCells1).contains(cellId) && (block == Block.DESTRUCTIBLE_WALL || block.isBonus())) { | 131 | } else if ((blastedCells1).contains(cellId) && (block == Block.DESTRUCTIBLE_WALL || block.isBonus())) { |
132 | if (block == Block.DESTRUCTIBLE_WALL) { | 132 | if (block == Block.DESTRUCTIBLE_WALL) { |
133 | Block bonus = randomBonus(); | 133 | Block bonus = randomBonus(); |
134 | blocks1.add(Sq.repeat(Ticks.WALL_CRUMBLING_TICKS, Block.CRUMBLING_WALL).concat(Sq.constant(bonus))); | 134 | blocks1.add(Sq.repeat(Ticks.WALL_CRUMBLING_TICKS, Block.CRUMBLING_WALL).concat(Sq.constant(bonus))); |