diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-03-28 13:50:35 +0100 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-03-28 13:50:35 +0100 |
commit | 856dbcba2abb78d889045e96f47b6727b230359e (patch) | |
tree | bf4cfd236082bd0af7e75c7de050f832f9a6017c /sw-common-model | |
parent | Add board components (diff) | |
download | seven-wonders-856dbcba2abb78d889045e96f47b6727b230359e.tar.gz seven-wonders-856dbcba2abb78d889045e96f47b6727b230359e.tar.bz2 seven-wonders-856dbcba2abb78d889045e96f47b6727b230359e.zip |
Add hand components
Diffstat (limited to 'sw-common-model')
-rw-r--r-- | sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt index c538b3bf..24c640b2 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt @@ -5,17 +5,27 @@ import org.luxons.sevenwonders.model.api.PlayerDTO import org.luxons.sevenwonders.model.boards.Requirements import org.luxons.sevenwonders.model.resources.ResourceTransactions +interface Card { + val name: String + val color: Color + val requirements: Requirements + val chainParent: String? + val chainChildren: List<String> + val image: String + val back: CardBack +} + @Serializable data class TableCard( - val name: String, - val color: Color, - val requirements: Requirements, - val chainParent: String?, - val chainChildren: List<String>, - val image: String, - val back: CardBack, + override val name: String, + override val color: Color, + override val requirements: Requirements, + override val chainParent: String?, + override val chainChildren: List<String>, + override val image: String, + override val back: CardBack, val playedDuringLastMove: Boolean -) +) : Card /** * A card with contextual information relative to the hand it is sitting in. The extra information is especially useful @@ -23,15 +33,15 @@ data class TableCard( */ @Serializable data class HandCard( - val name: String, - val color: Color, - val requirements: Requirements, - val chainParent: String?, - val chainChildren: List<String>, - val image: String, - val back: CardBack, + override val name: String, + override val color: Color, + override val requirements: Requirements, + override val chainParent: String?, + override val chainChildren: List<String>, + override val image: String, + override val back: CardBack, val playability: CardPlayability -) +) : Card @Serializable data class PreparedCard( |