aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ch/epfl/xblast/server/Block.java10
-rw-r--r--src/ch/epfl/xblast/server/Board.java10
-rw-r--r--src/ch/epfl/xblast/server/Ticks.java18
3 files changed, 26 insertions, 12 deletions
diff --git a/src/ch/epfl/xblast/server/Block.java b/src/ch/epfl/xblast/server/Block.java
index 8268f33..d1c96e5 100644
--- a/src/ch/epfl/xblast/server/Block.java
+++ b/src/ch/epfl/xblast/server/Block.java
@@ -1,5 +1,11 @@
1package ch.epfl.xblast.server; 1package ch.epfl.xblast.server;
2 2
3/**
4 * A Block.
5 *
6 * @author Pacien TRAN-GIRARD (261948)
7 * @author Timothée FLOURE (257420)
8 */
3public enum Block { 9public enum Block {
4 10
5 /** 11 /**
@@ -41,9 +47,9 @@ public enum Block {
41 } 47 }
42 48
43 /** 49 /**
44 * Returns T(this block cast a shadow) 50 * Returns T(this block cast a shadow).
45 * 51 *
46 * @returns T(this block cast a shadow) 52 * @return T(this block cast a shadow)
47 */ 53 */
48 public boolean castsShadow() { 54 public boolean castsShadow() {
49 return this == INDESTRUCTIBLE_WALL || this == DESTRUCTIBLE_WALL || this == CRUMBLING_WALL; 55 return this == INDESTRUCTIBLE_WALL || this == DESTRUCTIBLE_WALL || this == CRUMBLING_WALL;
diff --git a/src/ch/epfl/xblast/server/Board.java b/src/ch/epfl/xblast/server/Board.java
index fa91587..b385ed8 100644
--- a/src/ch/epfl/xblast/server/Board.java
+++ b/src/ch/epfl/xblast/server/Board.java
@@ -6,6 +6,8 @@ import ch.epfl.cs108.Sq;
6import ch.epfl.xblast.Lists; 6import ch.epfl.xblast.Lists;
7 7
8/** 8/**
9 * A two-dimensional Board in which the game takes place.
10 *
9 * @author Pacien TRAN-GIRARD (261948) 11 * @author Pacien TRAN-GIRARD (261948)
10 * @author Timothée FLOURE (257420) 12 * @author Timothée FLOURE (257420)
11 */ 13 */
@@ -19,8 +21,8 @@ public final class Board {
19 /** 21 /**
20 * Instanciates a new Board with the given sequence of blocks. 22 * Instanciates a new Board with the given sequence of blocks.
21 * 23 *
22 * @throws IllegalArgumentEception if the blocks is not composed of 195 elements 24 * @throws IllegalArgumentException if the blocks is not composed of 195 elements
23 * @param blocks sequence conataining all the blocks of the Boards 25 * @param blocks sequence containing all the blocks of the Boards
24 */ 26 */
25 public Board (List<Sq<Block>> blocks) { 27 public Board (List<Sq<Block>> blocks) {
26 if (blocks.size() != 195) { 28 if (blocks.size() != 195) {
@@ -95,11 +97,11 @@ public final class Board {
95 } 97 }
96 98
97 /** 99 /**
98 * Build a symetric walled board from the NWB quadrant. 100 * Build a symmetric walled board from the NWB quadrant.
99 * 101 *
100 * @param quadrantNWBlocks the NW quadrant of the board (inner blocks only!) 102 * @param quadrantNWBlocks the NW quadrant of the board (inner blocks only!)
101 * @throws IllegalArgumentException if quadrantNWBlocks is not 6*7 103 * @throws IllegalArgumentException if quadrantNWBlocks is not 6*7
102 * @return a new walled board simmetricaly filled with the given NW quadrant 104 * @return a new walled board symmetrically filled with the given NW quadrant
103 */ 105 */
104 public static Board ofQuadrantNWBlocksWalled(List<List<Block>> quadrantNWBlocks) { 106 public static Board ofQuadrantNWBlocksWalled(List<List<Block>> quadrantNWBlocks) {
105 if (quadrantNWBlocks.size() != 6) { 107 if (quadrantNWBlocks.size() != 6) {
diff --git a/src/ch/epfl/xblast/server/Ticks.java b/src/ch/epfl/xblast/server/Ticks.java
index 8793adb..0992876 100644
--- a/src/ch/epfl/xblast/server/Ticks.java
+++ b/src/ch/epfl/xblast/server/Ticks.java
@@ -1,33 +1,39 @@
1package ch.epfl.xblast.server; 1package ch.epfl.xblast.server;
2 2
3/**
4 * The Ticks interface defines durations in ticks of time-sensitive aspects of the game.
5 *
6 * @author Pacien TRAN-GIRARD (261948)
7 * @author Timothée FLOURE (257420)
8 */
3public interface Ticks { 9public interface Ticks {
4 /** 10 /**
5 * Duration of the death of a player. 11 * Duration of the death of a player (in ticks).
6 */ 12 */
7 public static int PLAYER_DYING_TICKS = 8; 13 public static int PLAYER_DYING_TICKS = 8;
8 14
9 /** 15 /**
10 * Duration of the invulnerability of a player. 16 * Duration of the invulnerability of a player (in ticks).
11 */ 17 */
12 public static int PLAYER_INVULNERABLE_TICKS = 64; 18 public static int PLAYER_INVULNERABLE_TICKS = 64;
13 19
14 /** 20 /**
15 * Duration of the timer of a bomb. 21 * Duration of the timer of a bomb (in ticks).
16 */ 22 */
17 public static int BOMB_FUSE_TICKS = 100; 23 public static int BOMB_FUSE_TICKS = 100;
18 24
19 /** 25 /**
20 * Duration of an explosion. 26 * Duration of an explosion (in ticks).
21 */ 27 */
22 public static int EXPLOSION_TICKS = 30; 28 public static int EXPLOSION_TICKS = 30;
23 29
24 /** 30 /**
25 * Duration of crumbling of a wall. 31 * Duration of crumbling of a wall (in ticks).
26 */ 32 */
27 public static int WALL_CRUMBLLING_TICKS = EXPLOSION_TICKS; 33 public static int WALL_CRUMBLLING_TICKS = EXPLOSION_TICKS;
28 34
29 /** 35 /**
30 * Duration of the presence of a bonus. 36 * Duration of the presence of a bonus (in ticks).
31 */ 37 */
32 public static int BONUS_DISAPPEARING_TICKS = EXPLOSION_TICKS; 38 public static int BONUS_DISAPPEARING_TICKS = EXPLOSION_TICKS;
33} 39}