Skip to content

Instantly share code, notes, and snippets.

@dgknght
dgknght / comparing_decks.js
Created July 22, 2020 19:01
Compare deck objects
// First maybe see how javascript does this:
["one", "two"] === ["one", "two"]; // is this true?
["one", "two"] === ["three", "four"]; // is this false?
// Alternatively, create one big string value for each deck
function deckToString(deck) {
deck.getCards().map(c => `${c.getValue()}:${c.getSuit()}`).join(',');
}
// then compare those
@dgknght
dgknght / keybase.md
Created March 20, 2018 19:53
keybase verification

Keybase proof

I hereby claim:

  • I am dgknght on github.
  • I am dgknght (https://keybase.io/dgknght) on keybase.
  • I have a public key ASC-4EF5gPCwxr0WaPy6KCXoiuy2aSIjY4fKTRm5V0tuCQo

To claim this, I am signing this object: