aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2016-04-10 11:13:19 +0200
committerPacien TRAN-GIRARD2016-04-10 11:13:19 +0200
commit769b3a2726d80e67a8fbc4aae7531967b87c997a (patch)
treebcd0fa9b11f539533516fd4a4278cb8dd24073b1
parent9a3d7cc87917b980c7faaed481ef40b09e0fa302 (diff)
downloadxblast-769b3a2726d80e67a8fbc4aae7531967b87c997a.tar.gz
Restore blasts propagation on indestructible walls and edit board printing instead
-rw-r--r--src/ch/epfl/xblast/server/GameState.java1
-rw-r--r--src/ch/epfl/xblast/server/debug/GameStatePrinter.java2
2 files changed, 1 insertions, 2 deletions
diff --git a/src/ch/epfl/xblast/server/GameState.java b/src/ch/epfl/xblast/server/GameState.java
index a59c7b5..22fe233 100644
--- a/src/ch/epfl/xblast/server/GameState.java
+++ b/src/ch/epfl/xblast/server/GameState.java
@@ -119,7 +119,6 @@ public final class GameState {
119 .filter(e -> !e.isEmpty()) 119 .filter(e -> !e.isEmpty())
120 .map(Sq::head)) 120 .map(Sq::head))
121 .filter(b -> !b.isEmpty()) 121 .filter(b -> !b.isEmpty())
122 .filter(b -> board0.blockAt(b.head()).isDestructible())
123 .collect(Collectors.toList()); 122 .collect(Collectors.toList());
124 } 123 }
125 124
diff --git a/src/ch/epfl/xblast/server/debug/GameStatePrinter.java b/src/ch/epfl/xblast/server/debug/GameStatePrinter.java
index 33be70c..fe4c446 100644
--- a/src/ch/epfl/xblast/server/debug/GameStatePrinter.java
+++ b/src/ch/epfl/xblast/server/debug/GameStatePrinter.java
@@ -66,7 +66,7 @@ public final class GameStatePrinter {
66 if (p != null) 66 if (p != null)
67 return GameStatePrinter.stringForPlayer(p); 67 return GameStatePrinter.stringForPlayer(p);
68 68
69 if (s.blastedCells().contains(c)) 69 if (s.blastedCells().contains(c) && s.board().blockAt(c).isDestructible())
70 return ANSIColor.MAGENTA.coloredText("**"); 70 return ANSIColor.MAGENTA.coloredText("**");
71 71
72 return GameStatePrinter.stringForBlock(s.board().blockAt(c)); 72 return GameStatePrinter.stringForBlock(s.board().blockAt(c));