Commit graph

43 commits

Author SHA1 Message Date
ItsDrike bbf1cd2eaa
Move FoundationPiles to it's own file 2024-12-04 19:26:16 +01:00
ItsDrike 44318ac5ac
Move DrawPile to it's own file 2024-12-04 19:22:20 +01:00
ItsDrike 981d724ee4
Move ThrowawayPile to it's own file 2024-12-04 19:20:06 +01:00
ItsDrike 5dd95b1a65
Separate Tableau to it's own file 2024-12-04 19:19:39 +01:00
ItsDrike 0364ae6b9e
Render a blank card if draw pile is empty 2024-12-04 19:15:27 +01:00
ItsDrike 12676e36b7
Remove unnecessary Solitare pkg QML import 2024-12-04 19:15:10 +01:00
ItsDrike 048054be13
Render a blank slot for empty column 2024-12-04 19:08:02 +01:00
ItsDrike a381288413
Manually connect the foundationChanged signal to slot
For some reason, the automatic signal-slot connection based on naming
doesn't work, call connect manually from the constructor instead.
2024-12-04 19:07:14 +01:00
ItsDrike 492f8cfec4
Add a quick function to set up a winning deck 2024-12-04 19:06:50 +01:00
ItsDrike aa611b81ed
Don't pre-draw cards 2024-12-04 18:04:19 +01:00
ItsDrike 548d36a358
clean up ensureColumnRevealed method 2024-12-04 18:03:06 +01:00
ItsDrike 5696e244f2
bug: fix col auto-move for multiple cards 2024-12-04 18:02:02 +01:00
ItsDrike 9b4c43d603
bug: QList has a copy constructor, use references 2024-12-04 18:00:45 +01:00
ItsDrike 986c2ce2be
Add support for making moves from QML 2024-12-04 00:05:29 +01:00
ItsDrike 4dbcd700c0
Rework various gamestate methods 2024-12-04 00:04:35 +01:00
ItsDrike 4ea9a04836
Add green background 2024-12-03 20:19:13 +01:00
ItsDrike f7d29ed4dc
Use Item instead of Row class for firstRow 2024-12-03 15:48:52 +01:00
ItsDrike 3acfe3e093
Turn GameState into QML singleton 2024-12-03 15:32:30 +01:00
ItsDrike f82b176f55
Add several debug logs to gamestate 2024-12-03 15:14:27 +01:00
ItsDrike d97cccfdf0
bug: work with last column slot, not first 2024-12-03 15:13:39 +01:00
ItsDrike dd19000089
bugfix: show the top card in foundation 2024-12-03 15:08:00 +01:00
ItsDrike 883d766dc3
Register QObject classes as QML elements via macros
Using manual registration with qmlRegisterType (or
qmlRegisterUncreatableType) isn't ideal, because Qt Creator can't pick
up on it. When using the macros, autocompletion & unknown type warnings
in the code disappear.
2024-12-03 15:05:30 +01:00
ItsDrike 629676428f
Fix some bugs in gamestate 2024-12-03 02:15:49 +01:00
ItsDrike 69c3b43834
Add logic for auto-moves 2024-12-03 01:55:54 +01:00
ItsDrike c47f973873
Extract logic to check if move to column is legal 2024-12-03 01:54:01 +01:00
ItsDrike 408457e7ce
Log warnings in certain unexpected branches 2024-12-03 01:51:11 +01:00
ItsDrike a1d676779d
Keep track of gameWon state 2024-12-03 01:33:12 +01:00
ItsDrike b558a3396e
Fix signal naming 2024-12-03 00:33:22 +01:00
ItsDrike c35dd9e56e
Store column property to avoid repetition 2024-12-03 00:23:49 +01:00
ItsDrike 3160ad6cc4
Make cardModel clickable 2024-12-02 19:30:47 +01:00
ItsDrike 2b58dc25fa
Render the columns in QML 2024-12-02 19:00:15 +01:00
ItsDrike 48f84bb528
Store revealed state for the columns 2024-12-02 16:10:51 +01:00
ItsDrike 730b92fa65
Add first row, with foundation,throwaway & draw piles 2024-12-02 15:35:37 +01:00
ItsDrike 0b65ce5d56
Add basic GameState class 2024-12-01 22:40:42 +01:00
ItsDrike 6ad3fe5bba
Make isFaceDown visual property only (pure QML) 2024-12-01 22:36:01 +01:00
ItsDrike 868699979d
Improve PlayingCard class
- Move to using enums to represent the suit & value
- This changes the badly named color to more appropriate suit.
- Add createDeck static method
2024-12-01 21:17:45 +01:00
ItsDrike e3242b71e9
Manage playing cards from C++ only 2024-12-01 19:43:49 +01:00
ItsDrike bfa876f87f
Add script to build the project manually 2024-12-01 01:10:43 +01:00
ItsDrike 9762d7d566
Add support for face down cards 2024-12-01 01:10:27 +01:00
ItsDrike 3a8b22e07a
Add support for showing playing cards 2024-12-01 01:01:37 +01:00
ItsDrike f165c825d4
Add GPL 3.0-or-later license 2024-11-30 21:01:01 +01:00
ItsDrike c3125c4944
Add scorebar 2024-11-30 20:56:20 +01:00
ItsDrike 8bd923a6fa
Initial commit 2024-11-30 19:23:45 +01:00