Skip to content

Commit d24feb6

Browse files
committed
refactor: remove superfluous generic IField parameter
1 parent a82d850 commit d24feb6

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

plugin/src/main/kotlin/sc/plugin2023/Field.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import sc.plugin2023.util.FieldConverter
99

1010
@XStreamConverter(FieldConverter::class)
1111
@XStreamAlias("field")
12-
data class Field(val fish: Int = 0, val penguin: Team? = null) : IField<Field>, PublicCloneable<Field> {
12+
data class Field(val fish: Int = 0, val penguin: Team? = null) : IField, PublicCloneable<Field> {
1313
override val isEmpty: Boolean
1414
get() = fish == 0 && penguin == null
1515
val isOccupied: Boolean

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import com.thoughtworks.xstream.annotations.XStreamAlias
44
import com.thoughtworks.xstream.annotations.XStreamAsAttribute
55
import sc.api.plugins.CubeDirection
66
import sc.api.plugins.IField
7+
import sc.framework.PublicCloneable
78

89
@XStreamAlias("field")
9-
sealed class Field: IField<Field> {
10+
sealed class Field: IField, PublicCloneable<Field> {
1011
override val isEmpty
1112
get() = true
1213

plugin2026/src/main/kotlin/sc/plugin2026/FieldState.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import sc.api.plugins.IField
44
import sc.api.plugins.Team
55
import sc.framework.DeepCloneable
66

7-
enum class FieldState(val size: Int): IField<FieldState>, DeepCloneable<FieldState> {
7+
enum class FieldState(val size: Int): IField, DeepCloneable<FieldState> {
88
ONE_S(1),
99
ONE_M(2),
1010
ONE_L(3),
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package sc.api.plugins
22

3-
interface IField<FIELD: IField<FIELD>> {
3+
interface IField {
44
val isEmpty: Boolean
55
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ typealias MutableTwoDBoard<FIELD> = Array<Array<FIELD>>
1313
* Ein rechteckiges Spielfeld aus Feldern.
1414
* Intern repräsentiert durch eine Liste an Zeilen.
1515
*/
16-
open class RectangularBoard<FIELD: IField<FIELD>>(
16+
open class RectangularBoard<FIELD: IField>(
1717
@XStreamImplicit protected open val gameField: TwoDBoard<FIELD>
1818
): FieldMap<FIELD>(), Collection<FIELD> {
1919

0 commit comments

Comments
 (0)