Download deck from magic.tcgplayer.com
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
9 posts
• Page 1 of 1
Download deck from magic.tcgplayer.com
by Vasiliy » 22 Nov 2009, 20:33
Hello. I am beginner Java programmer.
I write code to download deck from magic.tcgplayer.com
How it work...
1. Select "Download Deck" from menu in Deck editor

2. Enter deck URL, example: http://magic.tcgplayer.com/db/deck.asp?deck_id=474146
3. Deck downloads and analyzes.
If card from deck is unsupport from MTGForge, then this card is remove from deck.
I now, my code is not good, but i try.
I write code to download deck from magic.tcgplayer.com
How it work...
1. Select "Download Deck" from menu in Deck editor

2. Enter deck URL, example: http://magic.tcgplayer.com/db/deck.asp?deck_id=474146
3. Deck downloads and analyzes.
If card from deck is unsupport from MTGForge, then this card is remove from deck.
I now, my code is not good, but i try.
- Attachments
-
Gui_DeckEditor_Menu.zip- Source code
- (8.33 KiB) Downloaded 337 times
Sorry for my english. I speak english very bad.
- Vasiliy
- Programmer
- Posts: 47
- Joined: 15 Nov 2009, 12:26
- Has thanked: 0 time
- Been thanked: 0 time
Re: Download deck from magic.tcgplayer.com
by silly freak » 22 Nov 2009, 20:59
hi and thanks! i think this is a cool feature. a note on your code: you could do much shorter 
java usually uses the "char" type when working with strings, you don't need to handle codepoints usually. the java.lang.Character class also has many utilities.
and again, thanks, and don't hestitate to ask for help
(and if you want, tell your native tongue, maybe we have someone in your language on the forum)
java usually uses the "char" type when working with strings, you don't need to handle codepoints usually. the java.lang.Character class also has many utilities.
- Code: Select all
temp=rStr.codePointAt(a);
if(temp>=48 && temp<=57)
- Code: Select all
if(Character.isDigit(rStr.charAt(a)))
- Code: Select all
temp=rStr.codePointAt(a);
if(temp!=32)
- Code: Select all
if(rStr.charAt(a) != ' ')
and again, thanks, and don't hestitate to ask for help
(and if you want, tell your native tongue, maybe we have someone in your language on the forum)
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: Download deck from magic.tcgplayer.com
by DennisBergkamp » 22 Nov 2009, 21:00
This definitely looks cool, thanks Vasiliy 
-

DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Download deck from magic.tcgplayer.com
by Vasiliy » 23 Nov 2009, 06:54
I am from Russia. My native language is russian.silly freak wrote:and if you want, tell your native tongue, maybe we have someone in your language on the forum
Sorry for my english. I speak english very bad.
- Vasiliy
- Programmer
- Posts: 47
- Joined: 15 Nov 2009, 12:26
- Has thanked: 0 time
- Been thanked: 0 time
Re: Download deck from magic.tcgplayer.com
by zerker2000 » 24 Nov 2009, 07:42
Да есть русский на форуме, я:)(translation "yes there is a Russian guy on the forum: me").
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
- zerker2000
- Programmer
- Posts: 569
- Joined: 09 May 2009, 21:40
- Location: South Pasadena, CA
- Has thanked: 0 time
- Been thanked: 0 time
Re: Download deck from magic.tcgplayer.com
by nantuko84 » 24 Nov 2009, 08:46
прикольно:)(translation "fine, we are not alone here").
Re: Download deck from magic.tcgplayer.com
by Vasiliy » 24 Nov 2009, 10:51
Вау. Рад знакомству.
Sorry for my english. I speak english very bad.
- Vasiliy
- Programmer
- Posts: 47
- Joined: 15 Nov 2009, 12:26
- Has thanked: 0 time
- Been thanked: 0 time
Re: Download deck from magic.tcgplayer.com
by Rob Cashwalker » 24 Nov 2009, 14:59
And google says, "Wow. Glad acquaintance."Vasiliy wrote:Вау. Рад знакомству.
Добро пожаловать в сообщество программирования Forge.
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Download deck from magic.tcgplayer.com
by Mr.Chaos » 24 Nov 2009, 18:53
Haha. Me and Dennis throw in a line in Dutch sometimes since we are both from the Netherlands.
To me, Russian looks odd because it uses letters/symbols that are not in the western alphabet.
To me, Russian looks odd because it uses letters/symbols that are not in the western alphabet.
= coder at work, according to a coder.It does explain some of the bugs. - Mr.Chaos
- Tester
- Posts: 625
- Joined: 06 Sep 2008, 08:15
- Has thanked: 0 time
- Been thanked: 0 time
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 18 guests