Skip to content

Commit 35610f3

Browse files
committed
refactor(sdk): extract sensible moves limit
1 parent cc84bd8 commit 35610f3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdk/src/main/server-api/sc/api/plugins/TwoPlayerGameState.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package sc.api.plugins
22

33
import com.thoughtworks.xstream.annotations.XStreamAsAttribute
44

5+
const val SENSIBLE_MOVES_COUNT = 64
6+
57
abstract class TwoPlayerGameState<M: IMove>(
68
@XStreamAsAttribute
79
override val startTeam: Team
@@ -33,7 +35,7 @@ abstract class TwoPlayerGameState<M: IMove>(
3335
* Bei manchen Spielen wird aufgrund der unüberschaubaren Zahl möglicher Züge
3436
* nur ein Ausschnitt zurückgegeben.
3537
* */
36-
open fun getSensibleMoves(): List<M> = moves().take(64)
38+
open fun getSensibleMoves(): List<M> = moves().take(SENSIBLE_MOVES_COUNT)
3739

3840
/**
3941
* Gibt progressiv alle möglichen Züge in der aktuellen Spielsituation zurück.

0 commit comments

Comments
 (0)