From 581c4936faef7ea4a7119c270f8e9a40d77cb38a Mon Sep 17 00:00:00 2001 From: Laurent Date: Wed, 18 Mar 2020 15:31:37 +0100 Subject: [PATCH] Add rule to avoid having both ante and BB ante at the same time --- .../android/model/realm/handhistory/HandHistory.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/java/net/pokeranalytics/android/model/realm/handhistory/HandHistory.kt b/app/src/main/java/net/pokeranalytics/android/model/realm/handhistory/HandHistory.kt index 4aaf19d5..1458150b 100644 --- a/app/src/main/java/net/pokeranalytics/android/model/realm/handhistory/HandHistory.kt +++ b/app/src/main/java/net/pokeranalytics/android/model/realm/handhistory/HandHistory.kt @@ -78,11 +78,19 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Identifiabl * The ante */ var ante: Double = 0.0 + set(value) { + field = value + this.bigBlindAnte = false + } /*** * Big blind ante */ var bigBlindAnte: Boolean = false + set(value) { + field = value + this.ante = 0.0 + } /*** * Number of players in the hand