@@ -46,10 +46,6 @@ data class GameState @JvmOverloads constructor(
46
46
override var lastMove : Move ? = null ,
47
47
): TwoPlayerGameState<Move>(currentTeam) {
48
48
49
- init {
50
- println (this .longString())
51
- }
52
-
53
49
val currentShip: Ship
54
50
get() = ships[currentTeam.index]
55
51
@@ -69,8 +65,6 @@ data class GameState @JvmOverloads constructor(
69
65
it.speed * 10 +
70
66
it.coal
71
67
}!! .team
72
- // TODO or something like this?
73
- // Team.values().maxByOrNull { getPointsForTeam(it) }
74
68
75
69
fun calculatePoints (ship : Ship ) =
76
70
board.segmentIndex(ship.position).let { segmentIndex ->
@@ -136,7 +130,6 @@ data class GameState @JvmOverloads constructor(
136
130
override fun getAllMoves (): Iterator <IMove > =
137
131
getPossibleMoves().iterator()
138
132
139
- // TODO this should be a Stream
140
133
/* * Possible simple Moves (accelerate+turn+move) using at most the given coal amount. */
141
134
fun getPossibleMoves (maxCoal : Int = currentShip.coal): List <IMove > =
142
135
// SANDBANK checkSandbankAdvances(currentShip)?.map { Move(it) } ?:
@@ -337,7 +330,7 @@ data class GameState @JvmOverloads constructor(
337
330
338
331
override fun getPointsForTeam (team : ITeam ): IntArray =
339
332
ships[team.index].let { ship ->
340
- intArrayOf(ship.points, ship.speed, ship. coal)
333
+ intArrayOf(ship.points, ship.coal * 2 )
341
334
}
342
335
343
336
override fun clone (): GameState = copy(board = board.clone(), ships = ships.clone())
0 commit comments