We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98670d6 commit 550808dCopy full SHA for 550808d
plugin/src/shared/sc/plugin2021/util/GameRuleLogic.kt
@@ -113,6 +113,7 @@ object GameRuleLogic {
113
} catch (e: ArrayIndexOutOfBoundsException) { false }
114
}
115
116
+ /** Returns true if the given [Coordinates] touch a corner of a field of same color. */
117
@JvmStatic
118
fun cornersOnColor(board: Board, position: Coordinates, color: Color): Boolean = listOf(
119
Vector(1, 1),
@@ -124,6 +125,7 @@ object GameRuleLogic {
124
125
126
127
128
+ /** Returns true if the given [Coordinates] are a corner. */
129
130
fun isOnCorner(position: Coordinates): Boolean =
131
Corner.asSet().contains(position)
0 commit comments