diff options
author | pacien | 2018-02-02 11:23:35 +0100 |
---|---|---|
committer | pacien | 2018-02-02 11:23:35 +0100 |
commit | a70916c1aba32f9ea52221e30e3882786911aaf2 (patch) | |
tree | 0773b5b9b14c6f9545a36fc54dbe2384364a3013 | |
parent | 4a8ec2f7fac9bc50ddceb49ce6f71db2fabbb2d1 (diff) | |
download | wallj-a70916c1aba32f9ea52221e30e3882786911aaf2.tar.gz |
Add bomb explosion event
Signed-off-by: pacien <pacien.trangirard@pacien.net>
6 files changed, 27 insertions, 5 deletions
diff --git a/src/main/java/fr/umlv/java/wallj/event/BlockCreateEvent.java b/src/main/java/fr/umlv/java/wallj/event/BlockCreateEvent.java index 1df177a..43d3f6c 100644 --- a/src/main/java/fr/umlv/java/wallj/event/BlockCreateEvent.java +++ b/src/main/java/fr/umlv/java/wallj/event/BlockCreateEvent.java | |||
@@ -10,7 +10,7 @@ import java.util.Objects; | |||
10 | * | 10 | * |
11 | * @author Pacien TRAN-GIRARD | 11 | * @author Pacien TRAN-GIRARD |
12 | */ | 12 | */ |
13 | public class BlockCreateEvent implements GameEvent { | 13 | public final class BlockCreateEvent implements GameEvent { |
14 | private final BlockType blockType; | 14 | private final BlockType blockType; |
15 | private final TileVec2 pos; | 15 | private final TileVec2 pos; |
16 | 16 | ||
diff --git a/src/main/java/fr/umlv/java/wallj/event/BlockDestroyEvent.java b/src/main/java/fr/umlv/java/wallj/event/BlockDestroyEvent.java index d954fa0..bdd1a44 100644 --- a/src/main/java/fr/umlv/java/wallj/event/BlockDestroyEvent.java +++ b/src/main/java/fr/umlv/java/wallj/event/BlockDestroyEvent.java | |||
@@ -9,7 +9,7 @@ import java.util.Objects; | |||
9 | * | 9 | * |
10 | * @author Pacien TRAN-GIRARD | 10 | * @author Pacien TRAN-GIRARD |
11 | */ | 11 | */ |
12 | public class BlockDestroyEvent implements GameEvent { | 12 | public final class BlockDestroyEvent implements GameEvent { |
13 | private final Block block; | 13 | private final Block block; |
14 | 14 | ||
15 | /** | 15 | /** |
diff --git a/src/main/java/fr/umlv/java/wallj/event/BombExplosionEvent.java b/src/main/java/fr/umlv/java/wallj/event/BombExplosionEvent.java new file mode 100644 index 0000000..c0baa83 --- /dev/null +++ b/src/main/java/fr/umlv/java/wallj/event/BombExplosionEvent.java | |||
@@ -0,0 +1,22 @@ | |||
1 | package fr.umlv.java.wallj.event; | ||
2 | |||
3 | import fr.umlv.java.wallj.board.TileVec2; | ||
4 | |||
5 | import java.util.Objects; | ||
6 | |||
7 | /** | ||
8 | * Signals the explosion of a bomb. | ||
9 | * | ||
10 | * @author Pacien TRAN-GIRARD | ||
11 | */ | ||
12 | public final class BombExplosionEvent { | ||
13 | private final TileVec2 source; | ||
14 | |||
15 | public BombExplosionEvent(TileVec2 source) { | ||
16 | this.source = Objects.requireNonNull(source); | ||
17 | } | ||
18 | |||
19 | public TileVec2 getSource() { | ||
20 | return source; | ||
21 | } | ||
22 | } | ||
diff --git a/src/main/java/fr/umlv/java/wallj/event/ConfirmOrder.java b/src/main/java/fr/umlv/java/wallj/event/ConfirmOrder.java index eb384cb..0f5fbd6 100644 --- a/src/main/java/fr/umlv/java/wallj/event/ConfirmOrder.java +++ b/src/main/java/fr/umlv/java/wallj/event/ConfirmOrder.java | |||
@@ -5,6 +5,6 @@ package fr.umlv.java.wallj.event; | |||
5 | * | 5 | * |
6 | * @author Adam NAILI | 6 | * @author Adam NAILI |
7 | */ | 7 | */ |
8 | public class ConfirmOrder implements InputEvent { | 8 | public final class ConfirmOrder implements InputEvent { |
9 | // void | 9 | // void |
10 | } | 10 | } |
diff --git a/src/main/java/fr/umlv/java/wallj/event/MoveRobotOrder.java b/src/main/java/fr/umlv/java/wallj/event/MoveRobotOrder.java index 9fdd10a..b3ca518 100644 --- a/src/main/java/fr/umlv/java/wallj/event/MoveRobotOrder.java +++ b/src/main/java/fr/umlv/java/wallj/event/MoveRobotOrder.java | |||
@@ -9,7 +9,7 @@ import java.util.Objects; | |||
9 | * | 9 | * |
10 | * @author Pacien TRAN-GIRARD | 10 | * @author Pacien TRAN-GIRARD |
11 | */ | 11 | */ |
12 | public class MoveRobotOrder implements InputEvent { | 12 | public final class MoveRobotOrder implements InputEvent { |
13 | private final TileVec2 target; | 13 | private final TileVec2 target; |
14 | 14 | ||
15 | /** | 15 | /** |
diff --git a/src/main/java/fr/umlv/java/wallj/event/StageClearedEvent.java b/src/main/java/fr/umlv/java/wallj/event/StageClearedEvent.java index 17e3ea4..2543ad9 100644 --- a/src/main/java/fr/umlv/java/wallj/event/StageClearedEvent.java +++ b/src/main/java/fr/umlv/java/wallj/event/StageClearedEvent.java | |||
@@ -5,6 +5,6 @@ package fr.umlv.java.wallj.event; | |||
5 | * | 5 | * |
6 | * @author Pacien TRAN-GIRARD | 6 | * @author Pacien TRAN-GIRARD |
7 | */ | 7 | */ |
8 | public class StageClearedEvent implements GameEvent { | 8 | public final class StageClearedEvent implements GameEvent { |
9 | // void | 9 | // void |
10 | } | 10 | } |