Skip to content

Suolumi/LorDeckCodeCpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LorDeckCodeCpp

A C++ implementation of Riot's Deck API for Legends of Runeterra.

Installation & Tests

$ git clone https://github.com/Suolumi/LorDeckCodeCpp
$ cd  LoRDeckCodeCpp
$ cmake .
$ make
$ ./LorDeckCode (or ./deckTesting for unit tests)

Example usage

#include <iostream>
#include "LoRDeck.hpp"

int main(void) {

    LoRDeck deck;
    LoRCard card("01SI011");
    deck.addCard(card, 3);
    deck.addCard("01SI015", 3);
    deck.addCard("01SI018", 3);
    deck.addCard("01SI030", 3);
    deck.addCard("01SI032", 3);
    deck.addCard("01SI041", 3);
    deck.addCard("01SI042", 3);
    deck.addCard("01SI043", 3);
    deck.addCard("01SI048", 3);
    deck.addCard("01SI001", 2);
    deck.addCard("01SI020", 2);
    deck.addCard("01SI029", 2);
    deck.addCard("01SI035", 2);
    deck.addCard("01SI044", 2);
    deck.addCard("01SI045", 2);
    deck.addCard("01SI026", 1);
    std::string encoded =  deck.encode();

    LoRDeck deck2(encoded);

    std::cout << encoded << std::endl;
    for (const auto &[card, quantity] : deck2) {
        std::cout << quantity << ":" << card.getCode() << std::endl;
    }
    return 0;
}

Dependencies

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published