From 616374e9ed7eb6cfc59f98c19a164960f7ab99a7 Mon Sep 17 00:00:00 2001 From: Tobias Heine Date: Wed, 10 Jan 2018 17:17:41 +0100 Subject: [PATCH] Reuse width and height from the previous board --- .../kotlin/com/novoda/gol/data/SimulationBoardEntity.kt | 2 +- .../com/novoda/gol/presentation/AppTerminalView.kt | 9 +++++++++ .../com/novoda/gol/presentation/BoardTerminalView.kt | 9 +++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 game-of-life-multiplatform/game-of-life-jvm/src/main/kotlin/com/novoda/gol/presentation/AppTerminalView.kt create mode 100644 game-of-life-multiplatform/game-of-life-jvm/src/main/kotlin/com/novoda/gol/presentation/BoardTerminalView.kt diff --git a/game-of-life-multiplatform/common/src/main/kotlin/com/novoda/gol/data/SimulationBoardEntity.kt b/game-of-life-multiplatform/common/src/main/kotlin/com/novoda/gol/data/SimulationBoardEntity.kt index 3929d9914..f1b72ad7f 100644 --- a/game-of-life-multiplatform/common/src/main/kotlin/com/novoda/gol/data/SimulationBoardEntity.kt +++ b/game-of-life-multiplatform/common/src/main/kotlin/com/novoda/gol/data/SimulationBoardEntity.kt @@ -8,7 +8,7 @@ data class SimulationBoardEntity(private val cellMatrix: CellMatrix) : BoardEnti val seeds = this.cellMatrix.getSeeds().toMutableList() seeds.addAll(patternEntity.getSeeds()) - val cellMatrix = ListBasedMatrix(width = 50, height = 50, seeds = seeds) + val cellMatrix = ListBasedMatrix(width = cellMatrix.getWidth(), height = cellMatrix.getHeight(), seeds = seeds) return SimulationBoardEntity(cellMatrix) } diff --git a/game-of-life-multiplatform/game-of-life-jvm/src/main/kotlin/com/novoda/gol/presentation/AppTerminalView.kt b/game-of-life-multiplatform/game-of-life-jvm/src/main/kotlin/com/novoda/gol/presentation/AppTerminalView.kt new file mode 100644 index 000000000..7af5657ea --- /dev/null +++ b/game-of-life-multiplatform/game-of-life-jvm/src/main/kotlin/com/novoda/gol/presentation/AppTerminalView.kt @@ -0,0 +1,9 @@ +package com.novoda.gol.presentation + +/** + * User: tobiasheine + * Date: 10.01.18 + * Time: 16:31 + */ +class AppTerminalView { +} diff --git a/game-of-life-multiplatform/game-of-life-jvm/src/main/kotlin/com/novoda/gol/presentation/BoardTerminalView.kt b/game-of-life-multiplatform/game-of-life-jvm/src/main/kotlin/com/novoda/gol/presentation/BoardTerminalView.kt new file mode 100644 index 000000000..dd31abe3a --- /dev/null +++ b/game-of-life-multiplatform/game-of-life-jvm/src/main/kotlin/com/novoda/gol/presentation/BoardTerminalView.kt @@ -0,0 +1,9 @@ +package com.novoda.gol.presentation + +/** + * User: tobiasheine + * Date: 10.01.18 + * Time: 16:42 + */ +class BoardTerminalView { +}