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 7709a2f commit 28fbf4eCopy full SHA for 28fbf4e
plugin/src/main/sc/plugin2022/GameState.kt
@@ -30,6 +30,7 @@ data class GameState @JvmOverloads constructor(
30
fun performMove(move: Move) {
31
ambers[currentTeam as Team] = (ambers[currentTeam] ?: 0) +
32
board.movePiece(move)
33
+ lastMove = move
34
turn++
35
}
36
plugin/src/main/sc/plugin2022/Move.kt
@@ -12,6 +12,8 @@ data class Move(
12
val delta: Vector
13
get() = destination - start
14
15
+ fun reverse() = Move(destination, start)
16
+
17
override fun toString(): String = "Zug von $start zu $destination"
18
19
/** Compares the Moves based on their length ([delta]). */
0 commit comments