diff --git a/bgw-gui/src/commonTest/kotlin/MapperTest.kt b/bgw-gui/src/commonTest/kotlin/MapperTest.kt deleted file mode 100644 index 0138ef768..000000000 --- a/bgw-gui/src/commonTest/kotlin/MapperTest.kt +++ /dev/null @@ -1,32 +0,0 @@ -import tools.aqua.bgw.components.ComponentView -import tools.aqua.bgw.components.layoutviews.GridPane -import tools.aqua.bgw.components.uicomponents.Label -import kotlin.test.Test -import kotlin.test.assertContentEquals - -class MapperTest { - @Test - fun testGridPaneMapping() { - val gridPane = GridPane(columns = 5, rows = 5) - repeat(gridPane.columns) { x -> - repeat(gridPane.rows) { y -> - val index = x + y * gridPane.columns - gridPane[x, y] = Label( - width = 100 + (0..20).random(), - height = 100 + (0..20).random(), - text = "($x, $y)", - ).apply { - onMouseClicked = { - gridPane.removeChild(this) - } - } - } - } - - - assertContentEquals( - expected = gridPane.grid.clone().toList(), - actual = gridPane.grid.toList() - ) - } -} \ No newline at end of file diff --git a/bgw-gui/src/commonTest/kotlin/SerializationTest.kt b/bgw-gui/src/commonTest/kotlin/SerializationTest.kt deleted file mode 100644 index 2b9567352..000000000 --- a/bgw-gui/src/commonTest/kotlin/SerializationTest.kt +++ /dev/null @@ -1,39 +0,0 @@ -import data.event.MouseEventData -import kotlin.test.Test -import kotlinx.serialization.encodeToString -import tools.aqua.bgw.components.ComponentView -import tools.aqua.bgw.components.layoutviews.CameraPane -import tools.aqua.bgw.components.layoutviews.LayoutView -import tools.aqua.bgw.components.layoutviews.Pane -import tools.aqua.bgw.components.uicomponents.Label -import tools.aqua.bgw.components.uicomponents.TextField -import tools.aqua.bgw.core.BoardGameScene -import tools.aqua.bgw.event.MouseButtonType -import tools.aqua.bgw.visual.ColorVisual - -class SerializationTest { - - val scene = BoardGameScene(1920.0, 1080.0, ColorVisual.WHITE).apply { - val label = Label(visual= ColorVisual.RED, width = 200, height = 200, text = "Hello, SoPra!") - val label2 = Label(posX=200, posY=200, visual= ColorVisual.BLUE, width = 200, height = 200, text = "Hello, SoPra!") - val pane = Pane(visual= ColorVisual.GREEN, width = 200, height = 200).apply { - addAll(label, label2) - } - val cameraPane = CameraPane>(visual= ColorVisual.YELLOW, width = 200, height = 200, target = pane) - val input = TextField(posX = 50, posY = 450, width = 200, height = 200, text = "Click 2").apply { - prompt = "Enter your name" - visual = ColorVisual.RED - } - addComponents(input) - } - - val mouseEventData = MouseEventData( - posX = 100.0, - posY = 100.0, - button = MouseButtonType.LEFT_BUTTON) - @Test - fun testSerialization() { - val json = jsonMapper.encodeToString(SceneMapper.map(gameScene = scene)) - //println(json) - } -} \ No newline at end of file