From a111835984e2d6abbf3dcab317cf97c0f5842ba1 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Tue, 1 Mar 2016 17:38:14 +0100 Subject: Reformat code and doc-blocks --- src/ch/epfl/xblast/server/Board.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/ch') diff --git a/src/ch/epfl/xblast/server/Board.java b/src/ch/epfl/xblast/server/Board.java index bde0ae9..4d2e743 100644 --- a/src/ch/epfl/xblast/server/Board.java +++ b/src/ch/epfl/xblast/server/Board.java @@ -1,8 +1,8 @@ package ch.epfl.xblast.server; import ch.epfl.cs108.Sq; -import ch.epfl.xblast.Lists; import ch.epfl.xblast.Cell; +import ch.epfl.xblast.Lists; import java.util.ArrayList; import java.util.List; @@ -14,6 +14,7 @@ import java.util.List; * @author Timothée FLOURE (257420) */ public final class Board { + private static final int BLOCKS_LIST_SIZE = 195; private static final int BOARD_ROWS = 13; private static final int BOARD_COLUMNS = 15; @@ -23,10 +24,10 @@ public final class Board { private static final int QUADRANT_COLUMNS = 7; /** - * Throw an exeption if the matrix does not have the given number of rows/columns. + * Throw an exception if the matrix does not have the given number of rows/columns. * - * @param matrix the tested matrix - * @param rows the expected number of rows + * @param matrix the tested matrix + * @param rows the expected number of rows * @param columns the expected number of columns * @throws IllegalArgumentException if the matrix does not comply with the given sizes. */ @@ -48,7 +49,7 @@ public final class Board { private List> blocks; /** - * Instanciates a new Board with the given sequence of blocks. + * Instantiates a new Board with the given sequence of blocks. * * @param blocks sequence containing all the blocks of the Boards * @throws IllegalArgumentException if the blocks is not composed of BLOC_LIST_SIZE elements @@ -85,7 +86,7 @@ public final class Board { * * @param innerBlocks lists of the internal rows * @return a new walled board filled with the given rows - * @throws IllegalArgumentException if innerbLocks is not INNER_BOARD_ROWS * INNER_BOARD_COLUMNS + * @throws IllegalArgumentException if innerBlocks is not INNER_BOARD_ROWS * INNER_BOARD_COLUMNS */ public static Board ofInnerBlocksWalled(List> innerBlocks) { checkBlockMatrix(innerBlocks, INNER_BOARD_ROWS, INNER_BOARD_COLUMNS); @@ -147,4 +148,5 @@ public final class Board { public Block blockAt(Cell c) { return blocksAt(c).head(); } + } -- cgit v1.2.3