diff options
author | pacien | 2018-02-01 22:14:39 +0100 |
---|---|---|
committer | pacien | 2018-02-01 22:14:39 +0100 |
commit | e74141dc95a643b5409365f5301f9b9ffe0e6b21 (patch) | |
tree | 343227abffbdd4f647748c96218437231de1066c | |
parent | cd3d406a1b53b94a401e6523515a20fe72d964b5 (diff) | |
parent | 237606e9d76d3e65fe86e8be8b79d953f7c579fc (diff) | |
download | wallj-e74141dc95a643b5409365f5301f9b9ffe0e6b21.tar.gz |
Merge branch 'master' of https://github.com/pacien/upem-java-wallj
-rw-r--r-- | src/test/java/fr/umlv/java/wallj/controller/DisplayControllerTest.java | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/test/java/fr/umlv/java/wallj/controller/DisplayControllerTest.java b/src/test/java/fr/umlv/java/wallj/controller/DisplayControllerTest.java deleted file mode 100644 index bcd4de9..0000000 --- a/src/test/java/fr/umlv/java/wallj/controller/DisplayControllerTest.java +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | package fr.umlv.java.wallj.controller; | ||
2 | |||
3 | import fr.umlv.java.wallj.board.Board; | ||
4 | import fr.umlv.java.wallj.board.TileVec2; | ||
5 | import fr.umlv.java.wallj.context.Context; | ||
6 | import fr.umlv.java.wallj.context.Game; | ||
7 | import fr.umlv.java.wallj.context.ScreenManager; | ||
8 | import fr.umlv.java.wallj.block.Block; | ||
9 | import fr.umlv.java.wallj.block.BlockFactory; | ||
10 | import fr.umlv.java.wallj.block.BlockType; | ||
11 | import fr.umlv.zen5.Application; | ||
12 | import org.junit.jupiter.api.Test; | ||
13 | |||
14 | import java.awt.*; | ||
15 | import java.util.Collections; | ||
16 | import java.util.LinkedList; | ||
17 | |||
18 | public class DisplayControllerTest { | ||
19 | @Test | ||
20 | void TestDisplay() throws java.lang.InterruptedException { | ||
21 | |||
22 | Application.run(Color.WHITE, applicationContext -> { | ||
23 | for (; ; ) { | ||
24 | applicationContext.renderFrame(graphics2D -> { | ||
25 | Board.Builder builder = new Board.Builder(51, 51); | ||
26 | TileVec2 t0 = TileVec2.of(50, 50); | ||
27 | builder.setBlockTypeAt(t0, BlockType.WALL); | ||
28 | LinkedList<Board> boards = new LinkedList<>(); | ||
29 | boards.add(builder.build()); | ||
30 | Game game = new Game(boards); | ||
31 | ScreenManager screenManager = new ScreenManager(applicationContext, graphics2D); | ||
32 | try { | ||
33 | Thread.sleep(50); | ||
34 | } catch (Exception e) { | ||
35 | System.exit(-1); | ||
36 | } | ||
37 | Context context = new Context(game, Collections.emptyList(), screenManager.clearScreen()); | ||
38 | Block block = BlockFactory.build(BlockType.BOMB, t0); | ||
39 | block.update(context); | ||
40 | }); | ||
41 | } | ||
42 | }); | ||
43 | } | ||
44 | } | ||