solitare/DrawPile.qml

13 lines
323 B
QML
Raw Normal View History

2024-12-04 18:22:20 +00:00
import QtQuick
// Shows the top card facing down
// (or a blank card if the pile is empty)
CardModel {
card: GameState.drawPile.length > 0 ? GameState.drawPile[GameState.drawPile.length - 1] : null
isFaceDown: GameState.drawPile.length > 0 ? true : false
onClicked: {
GameState.drawNextCard()
}
}