From 769b3a2726d80e67a8fbc4aae7531967b87c997a Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sun, 10 Apr 2016 11:13:19 +0200 Subject: Restore blasts propagation on indestructible walls and edit board printing instead --- src/ch/epfl/xblast/server/GameState.java | 1 - src/ch/epfl/xblast/server/debug/GameStatePrinter.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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 { .filter(e -> !e.isEmpty()) .map(Sq::head)) .filter(b -> !b.isEmpty()) - .filter(b -> board0.blockAt(b.head()).isDestructible()) .collect(Collectors.toList()); } 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 { if (p != null) return GameStatePrinter.stringForPlayer(p); - if (s.blastedCells().contains(c)) + if (s.blastedCells().contains(c) && s.board().blockAt(c).isDestructible()) return ANSIColor.MAGENTA.coloredText("**"); return GameStatePrinter.stringForBlock(s.board().blockAt(c)); -- cgit v1.2.3