It is currently 08 Sep 2025, 04:36
   
Text Size

card db split in two

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

card db split in two

Postby Max mtg » 16 Feb 2013, 00:53

The former singleton carddb has now two instances. One keeps all common cards, another one is used for avatars, planes and schemes. When requesting a card from that storage you'll have to specify exactly which kind of card you mean.

Pros:
You may have avatar and creature with same name!
Schemes won't get in random decks for sure inless you've used that special store to get them.

Cons:
Extra efforts when looking for a card of unknown type (hope i wrote enough code to workaround thay problem)


Questions? Bug reports?
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: card db split in two

Postby friarsol » 16 Feb 2013, 01:02

According to Oracle, no cards have the same name. "Birds of Paradise" is a creature. "Birds of Paradise Avatar" is an Avatar.

As far as the split DB, I think that should be fine. Generally when you are looking for special cards, you only need those special cards.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: card db split in two

Postby Max mtg » 16 Feb 2013, 07:07

friarsol wrote:According to Oracle, no cards have the same name. "Birds of Paradise" is a creature. "Birds of Paradise Avatar" is an Avatar.
Good to know that it's now our workaround, but it's global.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 75 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 75 users online :: 0 registered, 0 hidden and 75 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 75 guests

Login Form