Coder Social home page Coder Social logo

shmup / redbean-cardgames Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 1.0 9.25 MB

To become a collection of card games within a redbean

JavaScript 76.14% Lua 9.59% Makefile 0.32% HTML 12.71% CSS 1.17% Shell 0.07%
cardgames mithriljs redbean lua fullmoon

redbean-cardgames's Introduction

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 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)
  • 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

dragging_example.mp4

redbean-cardgames's People

Contributors

shmup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ludoplex

redbean-cardgames's Issues

TODO: Remind myself about "Bad system call: 12"

They may have just had to --assimilate their bean

ddrucker@ogawa ~ took 6s
❯ git clone https://github.com/shmup/redbean-cardgames.git
Cloning into 'redbean-cardgames'...
remote: Enumerating objects: 572, done.
remote: Counting objects: 100% (572/572), done.
remote: Compressing objects: 100% (482/482), done.
remote: Total 572 (delta 101), reused 544 (delta 73), pack-reused 0
Receiving objects: 100% (572/572), 9.04 MiB | 8.78 MiB/s, done.
Resolving deltas: 100% (101/101), done.

ddrucker@ogawa ~
❯ sw_vers
ProductName:    macOS
ProductVersion: 12.4
BuildVersion:   21F79

ddrucker@ogawa ~
❯ uname -a
Darwin ogawa.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64

ddrucker@ogawa ~
❯ cd redbean-cardgames

ddrucker@ogawa …/redbean-cardgames on ξ‚  main
❯ make
curl -Rso zip.com https://redbean.dev/zip.com
chmod +x zip.com
curl -Rs https://redbean.dev/redbean-asan-2.0.16.com -o redbean.com.template && \
                chmod +x redbean.com.template
cp redbean.com.template redbean.com
cp -f redbean.com.template redbean.com
cd srv/ && ../zip.com -r ../redbean.com `ls -A`
/bin/sh: line 1: 99148 Bad system call: 12     ../zip.com -r ../redbean.com `ls -A`
make: *** [add] Error 140

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.