|
|
|
@ -48,7 +48,7 @@ data class Part(val number: Int, val from: Coordinate, val to: Coordinate) { |
|
|
|
&& y <= to.y |
|
|
|
|
|
|
|
fun isSelected(engine: List<String>) = |
|
|
|
engine.hasSymbols(from.x - 1, from.y - 1, to.x - from.x + 2) // above |
|
|
|
engine.hasSymbols(from.x - 1, from.y - 1, to.x - from.x + 1 + 2) // above |
|
|
|
|| engine.hasSymbols(from.x - 1, from.y + 1, to.x - from.x + 2) // below |
|
|
|
|| engine.hasSymbols(from.x - 1, from.y, 1) // left |
|
|
|
|| engine.hasSymbols(to.x + 1, from.y, 1) // right |
|
|
|
|