From 2d5117911c11fafc3c287e2ee74149f866c41954 Mon Sep 17 00:00:00 2001 From: joffrey-bion Date: Sun, 13 Dec 2020 01:39:06 +0100 Subject: Only transfer ownership to humans Resolve: https://github.com/joffrey-bion/seven-wonders/issues/73 --- .../src/commonMain/kotlin/org/luxons/sevenwonders/model/api/Player.kt | 3 +++ .../kotlin/org/luxons/sevenwonders/model/api/actions/Actions.kt | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'sw-common-model/src/commonMain') diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/Player.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/Player.kt index db4365f5..3963112a 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/Player.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/Player.kt @@ -7,6 +7,7 @@ import org.luxons.sevenwonders.model.wonders.AssignedWonder interface BasicPlayerInfo { val username: String val displayName: String + val isHuman: Boolean val icon: Icon? } @@ -14,6 +15,7 @@ interface BasicPlayerInfo { data class ConnectedPlayer( override val username: String, override val displayName: String, + override val isHuman: Boolean, override val icon: Icon?, ) : BasicPlayerInfo @@ -21,6 +23,7 @@ data class ConnectedPlayer( data class PlayerDTO( override val username: String, override val displayName: String, + override val isHuman: Boolean, override val icon: Icon?, val wonder: AssignedWonder, val isGameOwner: Boolean, diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/actions/Actions.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/actions/Actions.kt index ee5caef8..b0be3ae0 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/actions/Actions.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/actions/Actions.kt @@ -18,6 +18,10 @@ class ChooseNameAction( * The player's icon. */ val icon: Icon?, + /** + * Whether the new player is a human (as opposed to a bot). + */ + val isHuman: Boolean, ) @Serializable -- cgit