summaryrefslogtreecommitdiff
path: root/sw-common-model/src
diff options
context:
space:
mode:
authorjoffrey-bion <joffrey.bion@gmail.com>2020-12-13 01:39:06 +0100
committerjoffrey-bion <joffrey.bion@gmail.com>2020-12-13 01:40:51 +0100
commit2d5117911c11fafc3c287e2ee74149f866c41954 (patch)
tree5b4dce07c2097a3f0e6b140ce5005d154d2c9c57 /sw-common-model/src
parentAdd logging of BOT status (diff)
downloadseven-wonders-2d5117911c11fafc3c287e2ee74149f866c41954.tar.gz
seven-wonders-2d5117911c11fafc3c287e2ee74149f866c41954.tar.bz2
seven-wonders-2d5117911c11fafc3c287e2ee74149f866c41954.zip
Only transfer ownership to humans
Resolve: https://github.com/joffrey-bion/seven-wonders/issues/73
Diffstat (limited to 'sw-common-model/src')
-rw-r--r--sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/Player.kt3
-rw-r--r--sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/api/actions/Actions.kt4
2 files changed, 7 insertions, 0 deletions
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
bgstack15