Skip to content

Commit 27603a8

Browse files
committed
feat: canTurn Ship helper
1 parent be88340 commit 27603a8

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ The version should always be in sync with the [GUI](https://github.com/software-
1010
A `y` version of 0 marks the beta of the current year
1111
and likely contains breaking changes between patches.
1212

13-
### 24.0.8 All The Moves - 2023-08-29
13+
### 24.0.9 All The Moves - 2023-09-XX
14+
- Add a few helpers
15+
16+
### 24.0.8 All The Moves - 2023-09-04
1417
- moveIterator should now generate all possible Moves
1518
- Reduce usage of magic numbers
1619
- Fix some test cases and update kotest

plugin/src/main/kotlin/sc/plugin2024/Ship.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ data class Ship(
6262
override fun clone(): Ship =
6363
this.copy()
6464

65+
fun canTurn() = freeTurns > 0 || coal > 0
66+
6567
/** Adjust speed and movement simultaneously. */
6668
fun accelerateBy(diff: Int) {
6769
speed += diff

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ enum class Team(override val index: Int): ITeam {
88
ONE(0) {
99
override fun opponent(): Team = TWO
1010
override val letter = 'R'
11-
override val color = "Rot"
11+
override val color = "red"
1212
},
1313

1414
TWO(1) {
1515
override fun opponent(): Team = ONE
1616
override val letter = 'B'
17-
override val color = "Blau"
17+
override val color = "blue"
1818
};
1919

2020
abstract val color: String

0 commit comments

Comments
 (0)