Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shmup/redbean-cardgames

To become a collection of card games within a redbean
https://github.com/shmup/redbean-cardgames

cardgames fullmoon lua mithriljs redbean

Last synced: 1 day ago
JSON representation

To become a collection of card games within a redbean

Awesome Lists containing this project

README

        

# Card games

The idea here is to have a [redbean](https://justine.lol/redbean2/) 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).

```bash
$ make test
πŸ‚±: πŸƒ
πŸ‚²: πŸƒ‚
πŸ‚³: πŸƒƒπŸ‚ΆπŸ‚Ή
πŸ‚΄: πŸƒ„πŸ‚ΈπŸ‚½
[πŸ‚΅πŸ‚·πŸ‚ΊπŸ‚»] [πŸ‚Ύ]
```

## β™‘ TODO

#### [Calculation]() (patience)

- [ ] Update GameState after drag/drop (currently only updated on the DOM)
- [ ] Fire a validate request during a `dragenter` or `drop` ?
* 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)
- [x] Render unicode playing cards instead of indexes
- [x] Validate placement of cards in foundations
- [x] Render cards in the browser
- [x] Add drag/drop events

## β™’ Developer Documentation

- https://redbean.dev/
- https://github.com/pkulchenko/fullmoon/

## ♧ Lua Documentation

- https://devdocs.io/lua~5.4/
- https://learnxinyminutes.com/docs/lua/

## ♀ Sqlite Documentation

- https://devdocs.io/sqlite/
- https://learnxinyminutes.com/docs/sql/

-----

#### 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