aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/fr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/fr')
-rw-r--r--src/test/java/fr/umlv/java/wallj/controller/DisplayControllerTest.java44
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 @@
1package fr.umlv.java.wallj.controller;
2
3import fr.umlv.java.wallj.board.Board;
4import fr.umlv.java.wallj.board.TileVec2;
5import fr.umlv.java.wallj.context.Context;
6import fr.umlv.java.wallj.context.Game;
7import fr.umlv.java.wallj.context.ScreenManager;
8import fr.umlv.java.wallj.block.Block;
9import fr.umlv.java.wallj.block.BlockFactory;
10import fr.umlv.java.wallj.block.BlockType;
11import fr.umlv.zen5.Application;
12import org.junit.jupiter.api.Test;
13
14import java.awt.*;
15import java.util.Collections;
16import java.util.LinkedList;
17
18public 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}