aboutsummaryrefslogtreecommitdiff
path: root/test/ch/epfl/xblast/namecheck/NameCheck02.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/ch/epfl/xblast/namecheck/NameCheck02.java')
-rw-r--r--test/ch/epfl/xblast/namecheck/NameCheck02.java63
1 files changed, 63 insertions, 0 deletions
diff --git a/test/ch/epfl/xblast/namecheck/NameCheck02.java b/test/ch/epfl/xblast/namecheck/NameCheck02.java
new file mode 100644
index 0000000..47c4281
--- /dev/null
+++ b/test/ch/epfl/xblast/namecheck/NameCheck02.java
@@ -0,0 +1,63 @@
1package ch.epfl.xblast.namecheck;
2
3import ch.epfl.cs108.Sq;
4import ch.epfl.xblast.Cell;
5import ch.epfl.xblast.Lists;
6import ch.epfl.xblast.server.Block;
7import ch.epfl.xblast.server.Board;
8import ch.epfl.xblast.server.Ticks;
9
10import java.util.List;
11
12/**
13 * Classe abstraite utilisant tous les éléments de l'étape 2, pour essayer de
14 * garantir que ceux-ci ont le bon nom et les bons types. Attention, ceci n'est
15 * pas un test unitaire, et n'a pas pour but d'être exécuté!
16 *
17 * @author EPFL
18 */
19abstract class NameCheck02 {
20
21 void checkTicks() {
22 int x = Ticks.PLAYER_DYING_TICKS
23 + Ticks.PLAYER_INVULNERABLE_TICKS
24 + Ticks.BOMB_FUSE_TICKS
25 + Ticks.EXPLOSION_TICKS
26 + Ticks.WALL_CRUMBLING_TICKS
27 + Ticks.BONUS_DISAPPEARING_TICKS;
28 System.out.println(x);
29 }
30
31 void checkBlock() {
32 Block b = Block.FREE;
33 b = Block.INDESTRUCTIBLE_WALL;
34 b = Block.DESTRUCTIBLE_WALL;
35 b = Block.CRUMBLING_WALL;
36 boolean d = b.isFree() && b.canHostPlayer() && b.castsShadow();
37 System.out.println(b + "/" + d);
38 }
39
40 void checkLists() {
41 List<Integer> l1 = null;
42 List<String> l2 = null;
43 List<List<String>> l3 = null;
44 List<Integer> l1m = Lists.<Integer>mirrored(l1);
45 List<String> l2m = Lists.<String>mirrored(l2);
46 List<List<String>> l3m = Lists.<List<String>>mirrored(l3);
47 System.out.println("" + l1m + l2m + l3m);
48 }
49
50 void checkBoard() {
51 List<List<Block>> q = null;
52 Board b = Board.ofQuadrantNWBlocksWalled(q);
53 b = Board.ofInnerBlocksWalled(q);
54 b = Board.ofRows(q);
55 List<Sq<Block>> cells = null;
56 b = new Board(cells);
57 Cell c = null;
58 Sq<Block> bs = b.blocksAt(c);
59 Block l = b.blockAt(c);
60 System.out.println(bs + "/" + l);
61 }
62
63}