1
+ package sc.plugin2019
2
+
3
+ import com.thoughtworks.xstream.annotations.XStreamAlias
4
+ import com.thoughtworks.xstream.annotations.XStreamAsAttribute
5
+ import sc.api.plugins.Team
6
+ import sc.api.plugins.TwoPlayerGameState
7
+ import sc.plugin2026.Board
8
+ import sc.plugin2026.Move
9
+
10
+ /* *
11
+ * The GameState class represents the current state of the game.
12
+ *
13
+ * It holds all the information about the current round,
14
+ * to provide all information needed to make the next move.
15
+ *
16
+ * @property board The current game board.
17
+ * @property turn The number of turns already made in the game.
18
+ * @property lastMove The last move made in the game.
19
+ */
20
+ @XStreamAlias(value = " state" )
21
+ data class GameState @JvmOverloads constructor(
22
+ /* * Das aktuelle Spielfeld. */
23
+ override val board : Board = Board (),
24
+ /* * Die Anzahl an bereits getätigten Zügen. */
25
+ @XStreamAsAttribute override var turn : Int = 0 ,
26
+ /* * Der zuletzt gespielte Zug. */
27
+ override var lastMove : Move ? = null ,
28
+ ): TwoPlayerGameState<Move>(Team .ONE ) {
29
+
30
+ override fun getPointsForTeam (team : ITeam ): IntArray =
31
+ GameRuleLogic .greatestSwarmSize(board, playerColor) // TODO important
32
+
33
+ // TODO implement missing methods - check previous years
34
+
35
+ }
0 commit comments