From 6e911cbce608ff530815448ce0463048016f8f28 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Mon, 29 Feb 2016 15:28:56 +0100 Subject: Elaborate class documentation --- src/ch/epfl/xblast/server/Block.java | 10 ++++++++-- src/ch/epfl/xblast/server/Board.java | 10 ++++++---- src/ch/epfl/xblast/server/Ticks.java | 18 ++++++++++++------ 3 files changed, 26 insertions(+), 12 deletions(-) (limited to 'src/ch/epfl') 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 @@ package ch.epfl.xblast.server; +/** + * A Block. + * + * @author Pacien TRAN-GIRARD (261948) + * @author Timothée FLOURE (257420) + */ public enum Block { /** @@ -41,9 +47,9 @@ public enum Block { } /** - * Returns T(this block cast a shadow) + * Returns T(this block cast a shadow). * - * @returns T(this block cast a shadow) + * @return T(this block cast a shadow) */ public boolean castsShadow() { 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; import ch.epfl.xblast.Lists; /** + * A two-dimensional Board in which the game takes place. + * * @author Pacien TRAN-GIRARD (261948) * @author Timothée FLOURE (257420) */ @@ -19,8 +21,8 @@ public final class Board { /** * Instanciates a new Board with the given sequence of blocks. * - * @throws IllegalArgumentEception if the blocks is not composed of 195 elements - * @param blocks sequence conataining all the blocks of the Boards + * @throws IllegalArgumentException if the blocks is not composed of 195 elements + * @param blocks sequence containing all the blocks of the Boards */ public Board (List> blocks) { if (blocks.size() != 195) { @@ -95,11 +97,11 @@ public final class Board { } /** - * Build a symetric walled board from the NWB quadrant. + * Build a symmetric walled board from the NWB quadrant. * * @param quadrantNWBlocks the NW quadrant of the board (inner blocks only!) * @throws IllegalArgumentException if quadrantNWBlocks is not 6*7 - * @return a new walled board simmetricaly filled with the given NW quadrant + * @return a new walled board symmetrically filled with the given NW quadrant */ public static Board ofQuadrantNWBlocksWalled(List> quadrantNWBlocks) { 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 @@ package ch.epfl.xblast.server; +/** + * The Ticks interface defines durations in ticks of time-sensitive aspects of the game. + * + * @author Pacien TRAN-GIRARD (261948) + * @author Timothée FLOURE (257420) + */ public interface Ticks { /** - * Duration of the death of a player. + * Duration of the death of a player (in ticks). */ public static int PLAYER_DYING_TICKS = 8; /** - * Duration of the invulnerability of a player. + * Duration of the invulnerability of a player (in ticks). */ public static int PLAYER_INVULNERABLE_TICKS = 64; /** - * Duration of the timer of a bomb. + * Duration of the timer of a bomb (in ticks). */ public static int BOMB_FUSE_TICKS = 100; /** - * Duration of an explosion. + * Duration of an explosion (in ticks). */ public static int EXPLOSION_TICKS = 30; /** - * Duration of crumbling of a wall. + * Duration of crumbling of a wall (in ticks). */ public static int WALL_CRUMBLLING_TICKS = EXPLOSION_TICKS; /** - * Duration of the presence of a bonus. + * Duration of the presence of a bonus (in ticks). */ public static int BONUS_DISAPPEARING_TICKS = EXPLOSION_TICKS; } -- cgit v1.2.3