Help support TMP


"Card driven games- using apps for custom card decks" Topic


57 Posts

All members in good standing are free to post here. Opinions expressed here are solely those of the posters, and have not been cleared with nor are they endorsed by The Miniatures Page.

For more information, see the TMP FAQ.


Back to the Computer Moderated Rules Message Board

Back to the Modern Discussion (1946 to 2006) Message Board

Back to the Wargaming in General Message Board



3,941 hits since 6 Sep 2012
©1994-2017 Bill Armintrout
Comments or corrections?

Pages: 1 2 

Serotonin Inactive Member06 Sep 2012 3:25 a.m. PST

Im due to put a game of Too Fat lardies "Charlie Dont Surf" on this week and was preparing to make my own deck of cards for it when I had a bit of a rush of blood to my head and had an idea.

Could there be an app for those smart phone users of us (I have an iPhone and iPad myself) that could replicate a deck of cards and drawn them randomly. It would need to have the ability to make your own cards with the correct text on.

The first ones Ive come across so far is a couple of free flashcard apps, such as Flashcardlet and Flashcards+ that allow you to do just that. You can make your own decks up and save them for later use, and they allow random draws and the ability to remove cards and add them in as you go.

Does anone know of any other or even better apps that do a similar thing?

MajorB06 Sep 2012 3:35 a.m. PST

Sounds like a classic case of wanting to use technology when the existing method is quite adequate.

Serotonin Inactive Member06 Sep 2012 3:40 a.m. PST

Not really. Its labour and cost saving.

Its going to save me having to print out 20 or 30 cards from a PDF file which then need to be cut to size, pasted onto card to taste etc. Its fine for games that provide cards already like Muskets and Tomahawks and Maurice etc, but many of the TFL games dont (other than IABSM and they cost £8.00 GBP a pack nice as they are.

I'm also crap at shuffling…

Dynaman878906 Sep 2012 3:53 a.m. PST

Personally I found those flashcard apps cumbersome at best. I stopped looking at that point.

I bought the cards on Artscow when they were on sale – but that will not help you…

Actual options.

1 – Create a vassal mod, you need a PC to work it though, and you probably don't have time. (might be worth it for next time though)

2 – Get a regular card deck and write down what each card actually means. (hearts are VC, 2 = platoon 2, BM are the face cards, etc…)

3 – Get a regular deck and put stickers on them, write down what the card is for on the sticker.

4 – Poker chips, right down on the chips what each chip is, put chips in bag and pull them out. (this handles the inability to shuffle too!)

I can't shuffle either, so I bought a shuffling machine for $10 USD at the local CVS. It is a life saver since I love the GMT card games – playing those and being such a bad shuffler was terrible…

Serotonin Inactive Member06 Sep 2012 3:56 a.m. PST

I like the chips idea, I was thinking of doing similar on some MDF bases I have spare.

The apps Ive dloaded so far arent too cumbersome. They arent ideal though, hence why I wondered if this is a path others had trod.

Shame I cant program. There seems to be a possible gap in the market here.

Goose666 Inactive Member06 Sep 2012 4:05 a.m. PST

Why not just use, collectable card wallets.. ?
Print off your cards you want for your particular game and slip them in.. no need to worry about glue etc.

Also means you can re use them for other games.
Good quality ones can be had cheaply and will shuffle ok.

The other problem with apps, is its not easy for everyne in a game to see the screen, due to way they are displayed.

olicana06 Sep 2012 4:11 a.m. PST

Sounds like a classic case of wanting to use technology when the existing method is quite adequate.

I've got to agree. Personally, I love collecting cards.

olicana06 Sep 2012 4:16 a.m. PST

Why not just use, collectable card wallets.. ?

I use card sleeves all the time. They make suffling very easy.

I make cards in MS word. I make them in a 'table' so I can insert pics, etc.

Angel Barracks Inactive Member06 Sep 2012 4:42 a.m. PST

They look like Ultra Pro.

Personal logo toofatlardies Sponsoring Member of TMP06 Sep 2012 4:56 a.m. PST

Serotonin

I am actually looking into this at the moment. A simple ap which shuffled and dealt cards would be brilliant. Sadly I haven't yet found one that fits the bill and the cost of having one developed is collosal for something which would have limited sales (as in not millions of sales). However I will keep looking.

Richard

Serotonin Inactive Member06 Sep 2012 5:04 a.m. PST

Bloody place is full of luddites! ;p

I did wonder if you had thought of this Rich, and if there was any way it could be integrated into future tablet ruleset releases. but yeah, I could see how the market wouldnt be huge and it would be unlikely to make any profit.

I will persevere with the search for a decent flashcard app- I think the use of technology has a real future in the hobby. I use my phone/iPad all the time for gaming, it has so many applications. We have used it to take photos of the tabletop so people can then draw directly on the screen where their hidden deployments and ambushes etc. My forthcoming Charlie Dont Surf came will be having its own cliched but classic sound track playing in the background, and Im sure theres many ways it can be utilised (as well as the obvious such as my PDF rulesets I use on it).

gbowen06 Sep 2012 5:17 a.m. PST

I could do that in Android. If there is some demand I can sort it out. It would be easiest for me to create a basic shuffling App then put a different xml front end for each card game. I would need images of the cards (I could do that but want to keep my time constraints down). I can knock up an apk file and send it on. Let me know if there is any interest

Serotonin Inactive Member06 Sep 2012 5:21 a.m. PST

What I see is needed is the ability to have a deck of cards for a game and to be able to hot swap cards in and out of the deck (due to units turning up/dying etc), and then for those chosen cards to be displayed randomly. User made cards either done in app or for upload to the app from a PC/Cloud would also be good.

Some of the flahs card programmes seem to sort of do this but not without a bit of fussing and jiggery pokery.

Personal logo Extra Crispy Sponsoring Member of TMP06 Sep 2012 5:30 a.m. PST

Most games using cards allow players to hold a "hand" during play. Perhaps you can hold 3 cards, you can discard if you don't use one, etc. So if you have 2+ players each with their own cards you end up having to pass around a phone/tablet so they can review their cards?

An app will have a long way to go to replace paper. You really need a networked app so multiple devices can share a deck and keep each player's hand secret.

Serotonin Inactive Member06 Sep 2012 5:34 a.m. PST

Well obviously Im not thinking of using an app in those circumstances, that would never work, but for games where the cards are purely used for turn sequence like I Aint Been Shot Mum, Muskets and Tomahawks etc.

Im going to try it out with what I have (these flashcard apps) and report back how the group found it.

religon Inactive Member06 Sep 2012 6:01 a.m. PST

I build decks as Filemaker databases. They look very professional.

I print them to stiff stock 9 to a page. I have researched business card cutters (slitters) to increase the speed with which I revise decks.

Gaz004506 Sep 2012 6:04 a.m. PST

"Bloody place is full of Luddites"….LOL best line of the day…

MajorB06 Sep 2012 6:12 a.m. PST

"Bloody place is full of Luddites"

Why use a computer when a piece of paper and a pencil are cheaper and more efficient? (Spoken as one who has worked in the IT industry for more than 30 years)!

arthur181506 Sep 2012 6:26 a.m. PST

In an age when we see increasing numbers of people being 'replaced' by machines that cannot think but 'only obey orders' and consigned to unemployment &c., the Luddites – who were trying to protect the jobs of stockingers in the Nottinghamshire hosiery industry – seem to have been very prescient.
I can remember pre-computer days when there were two postal deliveries per morning, not one in early afternoon; school reports were personal comments, not pre-written statements from a menu &c &c.
One headmaster, newly enamoured of all things IT, asked my colleague if there was a program that could generate random numbers up to 12 for pupils to practise multiplication. She took a deep breath and replied she could think up numbers for herself…

Serotonin Inactive Member06 Sep 2012 6:30 a.m. PST

Im suprised most of you dont send your replies to threads on here by post to the Editor!

olicana06 Sep 2012 6:44 a.m. PST

He doesn't open our letters…

MajorB06 Sep 2012 6:54 a.m. PST

I'm suprised most of you dont send your replies to threads on here by post to the Editor!

I think you miss the point. There are some things that a computer is very good at and where the alternative is slow and expensive, like an internationally accessible doscussion forum such as this.

There are other things however that are far better done without a computer. For example a computer is really good at generating (pseudo) random numbers however I know few wargamers who would use a computer rather than roll dice!!

Serotonin Inactive Member06 Sep 2012 7:14 a.m. PST

I'm not the one who's missed the point. I pointed out that this was an alternative to cards for me due to circumstance and wondered if others had tried similar. Apart from one person answering that question all I have had is people essentially telling me my idea is pointless. I haven't the time or resources to make a deck of cards given my circumstances hence my need to try an alternative idea using the resources I do have to hand. I'm sorry if that wasnt clear enough to some of you.

MajorB06 Sep 2012 7:27 a.m. PST

I haven't the time or resources to make a deck of cards given my circumstances hence my need to try an alternative idea using the resources I do have to hand. I'm sorry if that wasnt clear enough to some of you.

If you haven't got the time and resources to make a deck of cards, you certainly won't have the time and resources to make an app!

Serotonin Inactive Member06 Sep 2012 7:37 a.m. PST

I'm not intending to make an app. Have I stepped into some sort of alternate universe or something. I asked if there were apps out there that would do what I want.

JeffGrein Supporting Member of TMP06 Sep 2012 7:37 a.m. PST

He is not trying to make the app he wants to know if something exists that he can use other than having to make the deck of cards.

I don't see the problem with Serotonin's question?

Serotonin Inactive Member06 Sep 2012 7:40 a.m. PST

I've found a couple of flashcard apps that sort of work, not totally ideal but will give them a go and report back.

MajorB06 Sep 2012 7:45 a.m. PST

I'm not intending to make an app.

He is not trying to make the app

Sorry, my mistake. I wrongly assumed that since TFL has said:

Sadly I haven't yet found one that fits the bill and the cost of having one developed is colossal

that that was what you were thinking of doing!

Personal logo toofatlardies Sponsoring Member of TMP06 Sep 2012 7:45 a.m. PST

Serotonin

I would be very interested in hearing how you get on.

Rich

Martin Rapier06 Sep 2012 8:55 a.m. PST

Back in the day we wrote a card dealing program to replace the card deck in SPIs 'Freedom in the Galaxy'. iirc it ran on an Amstrad.

The deck was so worn and tattered you could tell which cards were which (especially the much loved 'Imperial Atrocity' card).

In that particular case it was worth the effort to write the code from scratch. 25 years on I would hope techology has advanced to the point that someone else has done the hard work of writing a card shuffling and dealing framework to do the hard work.

PistolPete Inactive Member06 Sep 2012 9:22 a.m. PST

i've used "magic set editor" to make cards for d&d; it's easy, free and prints multiple cards on a single page – something i could never do on my own. i never spent the time to make any other templates but i didn't RTFM either. card sleeves are essential.

Temporary like Achilles Inactive Member06 Sep 2012 10:05 a.m. PST

I know there are various apps for learning foreign languages that allow you to make up word cards and then the app will draw them randomly (within the parameters you set). Perhaps that might be something you could adapt to your needs?

Not sure of the names of any of them unfortunately, but a search might help. My mate uses one to learn Japanese kanji on the train to and from work…

Cheers,
Aaron

Sergeant Paper06 Sep 2012 11:13 a.m. PST

As cheap and easy as it is to make them in Magic Set Editor, I've never seen the need to do it any other way*. If they get worn, I print another set.

Sergeant Paper
(you might tell by my nom de plume that I'm happy to work with paper and cardstock)

*I had previously done my own cards with MS office and Adobe graphics software, which was too much like work…

dmebust Supporting Member of TMP06 Sep 2012 11:24 a.m. PST

I made my own. The templet is from avery.com (the office supply people) use the business card templet. The card info came from the Yahoo groups files section (cut and paste, easy to do). The back of the card from the same location (the cover of CDS rules). Works real slick. Everthing is in a Word document format.

bobm195906 Sep 2012 1:52 p.m. PST

Serotonin is discovering the power of Luddism.
Remember ….more British troops fought Luddites around Huddersfield than were present at Waterloo.

John D Salt Inactive Member06 Sep 2012 2:27 p.m. PST

Martin Rapier wrote:


I would hope techology has advanced to the point that someone else has done the hard work of writing a card shuffling and dealing framework to do the hard work.

Doesn't need anything as grand as a framework, Python makes shuffling and dealing dead easy in a couple of lines of code. All you need do is specify a card class and bung instances of them in a list.

The following Python script took one evening to write and test. It creates, shuffles and deals at least eight different kinds of playing card deck, with or without jokers, as well as a Tarot deck. It does not use any visual representation of the cards, but anyone with a printable visual representation of their cards should really experience little difficulty in printing them out onto pre-perforated business card stock (you might remember the cards I made up for "A Footslogger Situation").

########################################################################
### ###
### Card Decks ###
### ###
### Python classes to represent decks of playing cards ###
### ###
### Written by J D Salt, 20 Nov 2008 ###
### ###
### Uses Python 2.5 ###
### ###
### Download Python from python.org ###
### ###
### All rights reversed. ###
### This program may be redistributed freely. ###
### ###
### Send comments or suggestions to jdsalt@gotadsl.co.uk ###
### ###
########################################################################

from random import *
# This is the clever bit; we will use the methods shuffle() and choice()
# on lists. As the PRNG is the Mersenne Twister, we are unlikely ever
# to find better.

# Ranks for a standard (Poker) deck
pokerranks = '2 3 4 5 6 7 8 9 10 Jack Queen King Ace'.split()
# Ranks for a Picquet deck
picquetranks = '7 8 9 10 Jack Queen King Ace'.split()
# Ranks for a Jass deck
jassranks = '6 7 8 9 10 Jack Queen King Ace'.split()
# Southern Swiss alternate names
swissranks = '6 7 8 9 Banner Under Over King Ace'.split()
# Ranks for an Italian deck
italianranks = '1 2 3 4 5 6 7 Knave Knight King'.split()
# Ranks for a Spanish deck
spanishranks = '1 2 3 4 5 6 7 8 9 Knave Knight King'.split()
# Pinochle deck
pinochle = '9 9 10 10 Jack Jack Queen Queen King King Ace Ace'.split()

# Minor arcana for a tarot deck
tarotranks = 'Ace 2 3 4 5 6 7 8 9 10 Page Knight Queen King'.split()

# Major arcana for a tarot deck
arcana = ('The Fool','The Magician','The High Priestess',\
'The Empress','The Emperor','The Hierophant','The Lovers',\
'The Chariot','Strength','The Hermit','The Wheel of Fortune',\
'Justice','The Hanged Man','Death','Temperance','The Devil',\
'The Tower', 'The Star','The Moon','The Sun','Judgement',\
'The World')

# French (international) suits
frenchsuits = 'Spades Hearts Diamonds Clubs'.split()
# Latin suits
latinsuits = 'Swords Cups Coins Staves'.split()
# German suits
germansuits = 'Leaves Hearts Bells Acorns'.split()
# Swiss-German suits
swisssuits = 'Roses Shields Bells Acorns'.split()

########################################################################
#
# A standard deck uses French suits and poker ranks, and these are
# the defaults used on creation of a deck instance.
#
# Other legitimate combinations of ranks and suits are:
#
# d = deck(ranks=picquetranks) 32-card Picquet deck
# d = deck(suits=germansuits) 52-card German deck
# d = deck(ranks=picquetranks, suits=germansuits) 32-card Skat deck
# d = deck(ranks=italianranks, suits=latinsuits) 40-card Italian deck
# d = deck(ranks=spanishranks, suits=latinsuits) 48-card Spanish deck
# d = deck(ranks=jassranks, suits=swisssuits) 36-card Jass deck
# d = deck(ranks=pinochle) 48-card Pinochle deck
#
########################################################################

class card: # Represents a single card.
# Must have a rank, may have a suit.

def __init__(self, rank, suit=None):
# Create a card of a specified rank and suit
self.rank = rank
self.suit = suit

def show(self):
# Display this card's rank and suit
if self.suit is None:
print self.rank
else:
print self.rank, 'of', self.suit
# end if

########################################################################

class hand(list): # A hand of cards.

def __init__(self, cards):
# Create a hand consisting of the specified cards
self.drawn = 0
for card in cards:
self.append(card)
# end for

def show(self):
# Display all the cards in the hand
for card in self:
card.show()
# end for

def cut(self):
# Pick and display a card at random, leaving the hand unaffected
choice(self).show()

def turn(self):
# Display the next card in sequence.
self[self.drawn].show()
self.drawn = self.drawn+1
if self.drawn == len(self): # When all cards in the hand have
self.drawn = 0 # been displayed, shuffle it and
shuffle(self) # start again
# end if

def draw(self, num_cards=1):
# Draw a specified number of cards from the hand
if num_cards > len(self):
print 'Can only draw', len(self), 'cards'
return self
# end if
cards = hand([])
for card in range(num_cards):
cards.append(self.pop(0))
# end for
return cards

def merge(self, otherdeck):
while len(otherdeck) > 0:
self.append(otherdeck.pop(0))
# end while

########################################################################

class deck(hand): # Deck inherits all methods of hand

def __init__(self, suits=frenchsuits, ranks=pokerranks, jokers=0):
self.drawn = 0
for s in suits:
for r in ranks:
self.append(card(r, s))
# end for
# end for
for j in range(jokers):
# Add the specified number of jokers, zero by default
self.append(card(rank='Joker'))
# end for
shuffle(self)

def deal(self, num_hands, num_cards):
# Create several equal-sized hands
if num_hands * num_cards > len(self):
print 'Cannot deal that many cards'
return None
# end if
hands = []
for eachhand in range(num_hands):
cards = self.draw(num_cards)
hands.append(cards)
# end for
return hands # Returns a list of hands of cards

########################################################################

class tarotdeck(deck): # Same as deck except for creation

def __init__(self, suits=latinsuits, ranks=tarotranks):
# Create a tarot deck;
# Four suits of minor arcana, plus one set of major arcana
deck.__init__(self, suits=suits, ranks=ranks)
for name in arcana:
self.append(card(name))
# end for
shuffle(self)

########################################################################

def test(): # Test code to check that the classes work as intended
d = deck(jokers = 2) # Create a standard deck with 2 jokers
hands = d.deal(4, 5) # Deal 4 hands of 5 cards
print
print 'Last hand was:'
print
hands[3].show() # Show the contents of the last hand dealt
shuffle(hands[3]) # Shuffle the hand and show it again
print
print 'Shuffled:'
print
hands[3].show()
hands[0].merge(hands[3])# Merge first and last hands
print
print 'Two combined hands:'
print
hands[0].show() # and show the result
print
hands[3].draw() # Show you can't draw from an empty hand

td = tarotdeck() # Create a tarot deck
print
print 'Random tarot card:'
print
td.cut() # Pick a card, any card
print
print 'Which may or may not mean that you are doomed.'
print 'So try another ten…'
print
td.draw(10).show() # OK, pick ten.

########################################################################

Farstar Inactive Member06 Sep 2012 2:54 p.m. PST

My "Luddite" problem with apps is simple. That which can be programmed, can also be mis-programmed. On purpose even. If I cannot check a deck by hand to see if the shuffle *or the deck itself* are at fault, then I cannot trust the deck.

It is the same reason games like Ex Illis are non-starters for me and many others: part of the game is concealed from me. In my hobby, that will not stand.

From a practical standpoint, there are also a number of games that use cards as standing status effects. If an app handles the deck, flopping a card out onto the tabletop in a persistent fashion becomes difficult or impossible.

John Thomas8 Supporting Member of TMP06 Sep 2012 4:12 p.m. PST

Not for the smartphone (screens are too small), but I use QuickCards3 and PDFill to make my TFL card desks.

AndrewGPaul Inactive Member07 Sep 2012 2:21 a.m. PST

There's plenty of dice-roller apps, and IIRC Privateer Press' army list app was supposed to be able to synce between opponents to give both players real-time information about each others' army lists and the damage they'd inflicted, so I don't think there's anything inherently impossible in what Serotonin is asking.

I'm also not convinced any app would be significantly less random than players shuffling by hand. Poker websites seem to manage fine, with much more at stake if they were to get it wrong.

From my point of view, it's not creating a single deck that is the problem I'd like solved – it's the creation or purchase, and storage, of the several I now seem to have; Warmachine/Hordes, Eden, Malifaux, Relic Knights and many others all have vast collections of stat cards, activation cards and whatnot that I need to keep safe and sorted. My iPad, on the other hand, can live on my bedside table and store all of them and more.

John D Salt, how do I take that bit of code and make it do something in Windows? :)

OSchmidt Inactive Member07 Sep 2012 4:29 a.m. PST

In games-- I'm not trusting anything that comes out of a computer, especially from some clowns private phone!

olicana07 Sep 2012 4:40 a.m. PST

and storage…..vast collections of stat cards, activation cards and whatnot that I need to keep safe and sorted. My iPad, on the other hand, can live on my bedside table and store all of them and more.

I put mine in a drawer, in one of my figure display cabinets, in my wargames room – I believe drawer storage was discovered years ago, possibly by Micro-soft.

John D Salt Inactive Member07 Sep 2012 8:21 a.m. PST

AndrewGPaul asked:


John D Salt, how do I take that bit of code and make it do something in Windows? :)

If you don't already have Python, you download the latest version of Python 2 (or Python 3 if you are prepared to re-write all the print statements) from pthyon.org. It's free, and there is a simple and foolproof Windows installer.

You then copy the text into a file with a .py ending, and run it from IDLE (the default editing environment bundled with "ordinary" Python).

If you want to give it a Windowsy GUI interface, Python comes with TkInter straight out of the box, or you have a fair choice of free GUI and graphics development packages of which PyQt is my current favourite.

All the best,

John.

Whirlwind07 Sep 2012 10:42 a.m. PST

You might be able to use this: mnemosyne-proj.org

Regards

Serotonin Inactive Member08 Sep 2012 4:21 a.m. PST

Feed back on how it went for Rich and others who are interested in more than telling me it was a dumb idea and cards are better etc etc.

I used a free app called Flashcardlet

link

The deck of cards took me around 5 minutes to do- very simple to create a deck and type in the name of the card. Slightly more clunky mechanics to work out how I would be able to add or subtract cards to the deck as the game progressed (Units coming on to the table or being wiped out etc) but I came up with a work around using the ability to flag cards.

In game I put the iPad on its stand at the end of the table where I would have placed the deck. It was very visible to all players as it was on its side. 'Turning' each card was just a matter of swiping the screen, and when the deck was done, again all I had to do was touch the shuffle deck button. Far quicker than using a real deck. Had no complaints from any of the players involved, in fact they barely commented after the first turn, which to me was a sign of its success- totally unobtrusive.

So would I do it again- yes for sure. For games where the cards only structure the order of the turn it works perfectly. So for games like Muskets and Tomahawks, IABSM or Charlie Dont Surf (as we were playing) its fine. Now I already own cards for M&T and IABSM, so will I replace them with the iPad version? Nope. Just because they are attratcive cards and look nice on the table. They have that advantage over the iPad solution as the cards on the app are just plain text on a white background a bit dull looking. But if I bought another game that needed such a deck I wouldnt hesitate using it over making my own cards or buying a professionally made deck. It also had the added bonus of kicking out 1960s rock n roll for atmosphere in game!

religon Inactive Member08 Sep 2012 6:20 a.m. PST

What formats does Flashcardlet support for decks?

Does one download Quizlet decks or build them in the Flashcardlet interface?

Can you import graphical decks from PDFs or folders of JPEGs?

Thanks.

Serotonin Inactive Member08 Sep 2012 7:41 a.m. PST

Yeah it imports Quizlet decks, but it also allows you to make decks in app with a very simple interface. Not sure about graphics as I literally spent 10 mins with it to design the deck. I tried a couple of other apps that appeared to offer more customization graphically etc, but none of them were as easy to use for what I wanted to do.

religon Inactive Member09 Sep 2012 6:39 a.m. PST

Thanks.

There does not appear to be a clear path for managing decks externally and importing them from a generic graphical format using Flashcardlet for presentation.

Andy ONeill09 Sep 2012 1:33 p.m. PST

Iron python is available for.Net and there's an entirely free version of visual studio available from microsoft. I dunnon about integrating iron python and you might not be able to with the free version.
But it's kind of trivial to write something like that in visual basic or c#.
Slap a cards table together in a sql database. Sql ce is just a file copy install with no services. There's also a free version of sql server with services if you really wanted to automate upload with ssis or something. Overkill though.
Use entity framework to access your database and create a card class. Pretty much drag n drop.
Include an int column for random ordering.
Process with linq.
Update your random number column.
Read the cards into a collection order by random column.
Present each in turn.
To shuffle repeat the random write and re read into your collection.

Optionally a screen or two to maintain the card records.

I'm busy until november.
I can write something for windows / win 8 then.
I can do pictures and animations, no probs.
Xaml, so possibly mac via silverlight but i'm more interested in win 8.
With xaml i can do drop shadows, rounded corners and even fancy stuff like make the card spin in 3d.

John D Salt Inactive Member09 Sep 2012 3:44 p.m. PST

AONeill wrote:


But it's kind of trivial to write something like that in visual basic or c#.

It's an entirely trivial problem. But regardless of its triviality, why should you pay good green cash money for commercial products like VB or C# when Python is not only free, but gives you the advantages of strong dynamic typing missing in VB (weakly-typed) and C# (statically typed)?


Slap a cards table together in a sql database. Sql ce is just a file copy install with no services. There's also a free version of sql server with services if you really wanted to automate upload with ssis or something. Overkill though.
Use entity framework to access your database and create a card class. Pretty much drag n drop.
Include an int column for random ordering.
Process with linq.
Update your random number column.
Read the cards into a collection order by random column.
Present each in turn.
To shuffle repeat the random write and re read into your collection.

I think you have rather failed to sppreciate the full triviality of the Python implementation. Yes, if you like, you can approach the problem by first writing a table-driven parser in Befunge, but it would be a harmfully stupid thing to do. You do not need any SQL, you do not need any tables, you do not need integer fields to randomnise on, you do not need LINQ, these are all absurd and needless complications.

To pick a card (or anything else) randomly from a list (let's call it mylist) in Python, you need only the statement

pick = choice(mylist)

To (pseudo-)randomly shuffle a list of cards (or anything else) in Python, you need only the statement

shuffle(mylist)

It's that simple. Why make it more complicated?


I can write something for windows / win 8 then.

The other nice thing about Python is that it runs on Macs and Unix boxes, as well as Wintel machines.


With xaml i can do drop shadows, rounded corners and even fancy stuff like make the card spin in 3d.

Oooh, shiney!

And we have added a markup language to the battery of unnecessary Microsoft proprietary tools being used to accomplish a trivial task.

All the best,

John.

Serotonin Inactive Member10 Sep 2012 5:31 a.m. PST

Also none of these solutions will work on an iPad or iPhone (probably not Android wither).

Pages: 1 2