Merge pull request 'reduced smelly code' (#36) from lastsmellfix into development
All checks were successful
Build and Test (KnockOutWhist) TeamCity build finished
All checks were successful
Build and Test (KnockOutWhist) TeamCity build finished
Reviewed-on: #36
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
package de.knockoutwhist.control
|
package de.knockoutwhist.control
|
||||||
|
|
||||||
import de.knockoutwhist.KnockOutWhist
|
|
||||||
import de.knockoutwhist.cards.Card
|
import de.knockoutwhist.cards.Card
|
||||||
import de.knockoutwhist.control.MatchControl.playerQueue
|
import de.knockoutwhist.control.MatchControl.playerQueue
|
||||||
import de.knockoutwhist.events.ERROR_STATUS.WRONG_CARD
|
import de.knockoutwhist.events.ERROR_STATUS.WRONG_CARD
|
||||||
@@ -21,10 +20,7 @@ object TrickControl {
|
|||||||
trick.setfirstcard(card)
|
trick.setfirstcard(card)
|
||||||
trick.cards += (card -> player)
|
trick.cards += (card -> player)
|
||||||
true
|
true
|
||||||
} else if (card.suit == trick.getfirstcard().getOrElse(card).suit) { // Wert aus Option extrahieren
|
} else if ((card.suit == trick.getfirstcard().getOrElse(card).suit) || (card.suit == round.trumpSuit)) { // Wert aus Option extrahieren
|
||||||
trick.cards += (card -> player)
|
|
||||||
true
|
|
||||||
} else if (card.suit == round.trumpSuit) {
|
|
||||||
trick.cards += (card -> player)
|
trick.cards += (card -> player)
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user