Awesome
Card games
The idea here is to have a redbean loaded with card games, both playable in your shell and in a GUI (aka your browser via localhost).
Starting small, I will introduce a couple patience games, followed up by 2+ player games against an AI. With those in place, I can consider handling wetware multiplayer (though maybe only in the GUI).
$ make test
π±: π
π²: π
π³: ππΆπΉ
π΄: ππΈπ½
[π΅π·πΊπ»] [πΎ]
β‘ TODO
Calculation (patience)
- Update GameState after drag/drop (currently only updated on the DOM)
- Fire a validate request during a
dragenter
ordrop
? * Kinda pointless but I wanted to toy with keeping that kinda stuff "truly" hidden until client needs it - Handle winning (aka empty talon and empty tableaus)
- Handle losing (determining if a game is unwinnable)
- Add some cute free sounds (or make my own)
- Render unicode playing cards instead of indexes
- Validate placement of cards in foundations
- Render cards in the browser
- Add drag/drop events
β’ Developer Documentation
β§ Lua Documentation
β€ Sqlite Documentation
Example of drag and drop
https://html.spec.whatwg.org/multipage/dnd.html#drag-and-drop-processing-model
https://user-images.githubusercontent.com/118710/185034491-11b5eb0e-0441-4f7a-8ee5-720b699457ef.mp4