Render a blank card if draw pile is empty
This commit is contained in:
parent
12676e36b7
commit
0364ae6b9e
2
Main.qml
2
Main.qml
|
@ -80,7 +80,7 @@ ApplicationWindow {
|
||||||
// Draw pile (only the top card is shown)
|
// Draw pile (only the top card is shown)
|
||||||
CardModel {
|
CardModel {
|
||||||
card: GameState.drawPile.length > 0 ? GameState.drawPile[GameState.drawPile.length - 1] : null
|
card: GameState.drawPile.length > 0 ? GameState.drawPile[GameState.drawPile.length - 1] : null
|
||||||
isFaceDown: true
|
isFaceDown: GameState.drawPile.length > 0 ? true : false
|
||||||
onClicked: {
|
onClicked: {
|
||||||
GameState.drawNextCard()
|
GameState.drawNextCard()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue