Skip to content

Commit 550808d

Browse files
committed
docs(plugin): add some documentation to logic functions
1 parent 98670d6 commit 550808d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plugin/src/shared/sc/plugin2021/util/GameRuleLogic.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ object GameRuleLogic {
113113
} catch (e: ArrayIndexOutOfBoundsException) { false }
114114
}
115115

116+
/** Returns true if the given [Coordinates] touch a corner of a field of same color. */
116117
@JvmStatic
117118
fun cornersOnColor(board: Board, position: Coordinates, color: Color): Boolean = listOf(
118119
Vector(1, 1),
@@ -124,6 +125,7 @@ object GameRuleLogic {
124125
} catch (e: ArrayIndexOutOfBoundsException) { false }
125126
}
126127

128+
/** Returns true if the given [Coordinates] are a corner. */
127129
@JvmStatic
128130
fun isOnCorner(position: Coordinates): Boolean =
129131
Corner.asSet().contains(position)

0 commit comments

Comments
 (0)