aboutsummaryrefslogtreecommitdiff
path: root/test/ch/epfl
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2016-03-01 18:36:32 +0100
committerPacien TRAN-GIRARD2016-03-01 18:38:02 +0100
commite80fc8044f9628c4d8d246eb764cb83a64f8d5dc (patch)
tree12ecb86ec1aa68cfb74d6ff4da5dfab50f8c9ac9 /test/ch/epfl
parenta111835984e2d6abbf3dcab317cf97c0f5842ba1 (diff)
downloadxblast-e80fc8044f9628c4d8d246eb764cb83a64f8d5dc.tar.gz
Automatic code cleanup
Diffstat (limited to 'test/ch/epfl')
-rw-r--r--test/ch/epfl/xblast/server/BoardTest.java31
1 files changed, 15 insertions, 16 deletions
diff --git a/test/ch/epfl/xblast/server/BoardTest.java b/test/ch/epfl/xblast/server/BoardTest.java
index 5cf2aef..014bd17 100644
--- a/test/ch/epfl/xblast/server/BoardTest.java
+++ b/test/ch/epfl/xblast/server/BoardTest.java
@@ -26,9 +26,8 @@ public class BoardTest {
26 public void isBoardBuilderIllegalInputThrowingException() { 26 public void isBoardBuilderIllegalInputThrowingException() {
27 List<Sq<Block>> blocks = new ArrayList<>(); 27 List<Sq<Block>> blocks = new ArrayList<>();
28 28
29 for (int i = 0; i < 8; i++) { 29 for (int i = 0; i < 8; i++)
30 blocks.add(Sq.constant(Block.FREE)); 30 blocks.add(Sq.constant(Block.FREE));
31 }
32 31
33 new Board(blocks); 32 new Board(blocks);
34 } 33 }
@@ -44,9 +43,9 @@ public class BoardTest {
44 List<List<Block>> rowsList = new ArrayList<>(); 43 List<List<Block>> rowsList = new ArrayList<>();
45 List<Block> sampleRow = new ArrayList<>(); 44 List<Block> sampleRow = new ArrayList<>();
46 45
47 for (int i = 0; i < 8; i++) { 46 for (int i = 0; i < 8; i++)
48 sampleRow.add(Block.FREE); 47 sampleRow.add(Block.FREE);
49 } 48
50 rowsList.add(sampleRow); 49 rowsList.add(sampleRow);
51 50
52 assertTrue(Board.ofRows(rowsList) instanceof Board); 51 assertTrue(Board.ofRows(rowsList) instanceof Board);
@@ -58,9 +57,9 @@ public class BoardTest {
58 57
59 for (int i = 0; i < 13; i++) { 58 for (int i = 0; i < 13; i++) {
60 List<Block> sampleRow = new ArrayList<>(); 59 List<Block> sampleRow = new ArrayList<>();
61 for (int j = 0; j < 15; j++) { 60 for (int j = 0; j < 15; j++)
62 sampleRow.add(Block.FREE); 61 sampleRow.add(Block.FREE);
63 } 62
64 rowsList.add(sampleRow); 63 rowsList.add(sampleRow);
65 } 64 }
66 65
@@ -78,9 +77,9 @@ public class BoardTest {
78 List<List<Block>> rowsList = new ArrayList<>(); 77 List<List<Block>> rowsList = new ArrayList<>();
79 List<Block> sampleRow = new ArrayList<>(); 78 List<Block> sampleRow = new ArrayList<>();
80 79
81 for (int i = 0; i < 8; i++) { 80 for (int i = 0; i < 8; i++)
82 sampleRow.add(Block.FREE); 81 sampleRow.add(Block.FREE);
83 } 82
84 rowsList.add(sampleRow); 83 rowsList.add(sampleRow);
85 84
86 assertTrue(Board.ofInnerBlocksWalled(rowsList) instanceof Board); 85 assertTrue(Board.ofInnerBlocksWalled(rowsList) instanceof Board);
@@ -92,9 +91,9 @@ public class BoardTest {
92 91
93 for (int i = 0; i < 11; i++) { 92 for (int i = 0; i < 11; i++) {
94 List<Block> sampleRow = new ArrayList<>(); 93 List<Block> sampleRow = new ArrayList<>();
95 for (int j = 0; j < 13; j++) { 94 for (int j = 0; j < 13; j++)
96 sampleRow.add(Block.FREE); 95 sampleRow.add(Block.FREE);
97 } 96
98 rowsList.add(sampleRow); 97 rowsList.add(sampleRow);
99 } 98 }
100 99
@@ -112,9 +111,9 @@ public class BoardTest {
112 List<List<Block>> rowsList = new ArrayList<>(); 111 List<List<Block>> rowsList = new ArrayList<>();
113 List<Block> sampleRow = new ArrayList<>(); 112 List<Block> sampleRow = new ArrayList<>();
114 113
115 for (int i = 0; i < 8; i++) { 114 for (int i = 0; i < 8; i++)
116 sampleRow.add(Block.FREE); 115 sampleRow.add(Block.FREE);
117 } 116
118 rowsList.add(sampleRow); 117 rowsList.add(sampleRow);
119 118
120 assertTrue(Board.ofQuadrantNWBlocksWalled(rowsList) instanceof Board); 119 assertTrue(Board.ofQuadrantNWBlocksWalled(rowsList) instanceof Board);
@@ -126,9 +125,9 @@ public class BoardTest {
126 125
127 for (int i = 0; i < 6; i++) { 126 for (int i = 0; i < 6; i++) {
128 List<Block> sampleRow = new ArrayList<>(); 127 List<Block> sampleRow = new ArrayList<>();
129 for (int j = 0; j < 7; j++) { 128 for (int j = 0; j < 7; j++)
130 sampleRow.add(Block.FREE); 129 sampleRow.add(Block.FREE);
131 } 130
132 rowsList.add(sampleRow); 131 rowsList.add(sampleRow);
133 } 132 }
134 133
@@ -143,9 +142,9 @@ public class BoardTest {
143 List<Sq<Block>> blocksList = new ArrayList<>(); 142 List<Sq<Block>> blocksList = new ArrayList<>();
144 143
145 blocksList.add(Sq.constant(Block.INDESTRUCTIBLE_WALL)); 144 blocksList.add(Sq.constant(Block.INDESTRUCTIBLE_WALL));
146 for (int i = 0; i < 194; i++) { 145 for (int i = 0; i < 194; i++)
147 blocksList.add(Sq.constant(Block.FREE)); 146 blocksList.add(Sq.constant(Block.FREE));
148 } 147
149 Board sampleBoard = new Board(blocksList); 148 Board sampleBoard = new Board(blocksList);
150 149
151 assertTrue(sampleBoard.blockAt(sampleCell) == Block.INDESTRUCTIBLE_WALL); 150 assertTrue(sampleBoard.blockAt(sampleCell) == Block.INDESTRUCTIBLE_WALL);