Magic Deck is a program for organising cards and constructing of card decks for trading card games such as Magic:the gathering. The program consists of a database of available card in the game and a database of cards currently owned buy the player. The player can use this to:
- Search their collection of cards
- Create and orgainise game decks using owned cards and available cards
- Generate a shopping list for new cards needed to create decks
- Analysis constructed decks for weakness
Currently the interface is a command line.
- view [deck|card]- To list cards in a deck or display information about a particlaur card
- search [cardname][colour][manacost][type] - search library for card
- add [deck][cardname|cardID] - add card to deck
- remove [deck] [cardname|cardID] - remove card from deck
- new deck|card [deckname|cardname] - Create new deck or card
- export library [deck] [html|xml|mws|sqldump] - export whole library or deck to specified format
- sortby [deck] [name|colour|mancost|type]- sort current deck by given field
- analyse [deck] - analyses the deck for mana curve, 'win by turn' stats and such
The original plan was to use sqlite to store, search and retrieve the card data. I decided against this when I discovered
that sqlite stores all data as a string. Why they do this makes no sense to me, it seems horribly inefficent.
So I've decided to code my own data structures, linked lists, binary trees and such.