Skip to content

Commit

Permalink
feat(block): initiate iblock class
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablito2020 committed Apr 16, 2022
1 parent 59373ad commit 873642d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/kotlin/IBlock.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class IBlock(position: Position) {

fun getNeededPositions(): List<Position> {
TODO()
}

}
1 change: 1 addition & 0 deletions src/main/kotlin/Position.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data class Position(val x: Int, val y: Int)
15 changes: 15 additions & 0 deletions src/test/kotlin/IBlockTest.kt
Original file line number Diff line number Diff line change
@@ -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()
)
}

}

0 comments on commit 873642d

Please sign in to comment.