aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ch/epfl/xblast/etape6/RandomTestGame.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/ch/epfl/xblast/etape6/RandomTestGame.java b/test/ch/epfl/xblast/etape6/RandomTestGame.java
index 8192956..90435c8 100644
--- a/test/ch/epfl/xblast/etape6/RandomTestGame.java
+++ b/test/ch/epfl/xblast/etape6/RandomTestGame.java
@@ -9,6 +9,7 @@ import ch.epfl.xblast.server.GameState;
9import ch.epfl.xblast.server.Player; 9import ch.epfl.xblast.server.Player;
10import ch.epfl.xblast.server.Player.DirectedPosition; 10import ch.epfl.xblast.server.Player.DirectedPosition;
11import ch.epfl.xblast.server.debug.RandomEventGenerator; 11import ch.epfl.xblast.server.debug.RandomEventGenerator;
12import org.junit.Before;
12import org.junit.Test; 13import org.junit.Test;
13 14
14import java.io.IOException; 15import java.io.IOException;
@@ -26,6 +27,7 @@ import static org.junit.Assert.assertTrue;
26 * Checks that the player move as in the example for the random game provided as example 27 * Checks that the player move as in the example for the random game provided as example
27 * 28 *
28 * @author EPFL 29 * @author EPFL
30 * @author Pacien TRAN-GIRARD (261948)
29 */ 31 */
30public class RandomTestGame { 32public class RandomTestGame {
31 33
@@ -56,7 +58,6 @@ public class RandomTestGame {
56 new Player(PlayerID.PLAYER_4, lives, p4, maxBombs, bombRange)); 58 new Player(PlayerID.PLAYER_4, lives, p4, maxBombs, bombRange));
57 } 59 }
58 60
59
60 @Test 61 @Test
61 public void testPositionsRandomGame() throws InterruptedException, IOException, URISyntaxException { 62 public void testPositionsRandomGame() throws InterruptedException, IOException, URISyntaxException {
62 String fileName = getClass().getResource("/stage6files/randomgame_positions.txt").toURI().getPath(); 63 String fileName = getClass().getResource("/stage6files/randomgame_positions.txt").toURI().getPath();
@@ -83,4 +84,12 @@ public class RandomTestGame {
83 player_positions.close(); 84 player_positions.close();
84 } 85 }
85 86
87 /**
88 * Resets the random bonus generator.
89 */
90 @Before
91 public void resetRandomSource() {
92 Block.resetRandomGenerator();
93 }
94
86} 95}