diff --git a/src/main/kotlin/IBlock.kt b/src/main/kotlin/IBlock.kt new file mode 100644 index 0000000..78b3d77 --- /dev/null +++ b/src/main/kotlin/IBlock.kt @@ -0,0 +1,7 @@ +class IBlock(position: Position) { + + fun getNeededPositions(): List { + TODO() + } + +} diff --git a/src/main/kotlin/Position.kt b/src/main/kotlin/Position.kt new file mode 100644 index 0000000..20b1ef9 --- /dev/null +++ b/src/main/kotlin/Position.kt @@ -0,0 +1 @@ +data class Position(val x: Int, val y: Int) diff --git a/src/test/kotlin/IBlockTest.kt b/src/test/kotlin/IBlockTest.kt new file mode 100644 index 0000000..185d386 --- /dev/null +++ b/src/test/kotlin/IBlockTest.kt @@ -0,0 +1,15 @@ +import org.junit.jupiter.api.Test +import kotlin.test.assertEquals + +class IBlockTest { + + @Test + fun `position 0,0 needed positions are (0,0), (0,1), (0,2), (0,3)`() { + val iBlock: IBlock = IBlock(Position(0, 0)) + assertEquals( + listOf(Position(0, 0), Position(0, 1), Position(0, 2), Position(0, 3)), + iBlock.getNeededPositions() + ) + } + +} \ No newline at end of file