Giter VIP home page Giter VIP logo

Comments (10)

pakastin avatar pakastin commented on May 22, 2024 1

I'm recreating the library, new version will support those..

from deck-of-cards.

alcalyn avatar alcalyn commented on May 22, 2024

Well ok, I thought the work you described here #28 was already merged.

from deck-of-cards.

pakastin avatar pakastin commented on May 22, 2024

This wasn't actually initially meant to be an API, but just an experiment (actually the first version was made with Flash over 10 years ago and then with Angular + TweenMax)..

from deck-of-cards.

pakastin avatar pakastin commented on May 22, 2024

Sorry no, it's still work in progress..

from deck-of-cards.

alcalyn avatar alcalyn commented on May 22, 2024

I tested it more deeply, I could make some good things easily, like

deck.cards[0].enableDragging()
deck.cards[0].setSide('front')
deck.cards[0].disableFlipping()
deck.cards.shuffle()
deck.cards.sort()

var deck2 = new Deck();
deck2.cards.push(deck.pop());

Method names are well intuitive, and that answers at many of my use cases.

from deck-of-cards.

pakastin avatar pakastin commented on May 22, 2024

Sounds legit! I haven't use this for a while myself, sorry I wasn't much help 🙂

from deck-of-cards.

alcalyn avatar alcalyn commented on May 22, 2024

nope, i'll submit a PR with that I could do.

Just a thing, do you remember how to update the deck cards view ? When I deck.cards.pop() a card, the view does not update.

from deck-of-cards.

pakastin avatar pakastin commented on May 22, 2024

card.unmount() should do the trick ;)

https://github.com/pakastin/deck-of-cards/blob/master/lib/card.js#L218-L222

from deck-of-cards.

alcalyn avatar alcalyn commented on May 22, 2024

Started a documentation: #39

from deck-of-cards.

alcalyn avatar alcalyn commented on May 22, 2024

Merged in #39 .

from deck-of-cards.

Related Issues (20)

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.