I’m starting to write my first app and learn at the same time. I’m writing an app that uses a deck of cards. Right now I have the following code to populate the deck:
local function deckSetup()
local C = {“Ace”, “Two”,“Three”,“Four”,“Five”,“Six”,“Seven”,“Eight”,“Nine”,“Ten”,“Jack”,“Queen”,“King”}
local S = {“Spades”,“Diamonds”,“Hearts”,“Clubs”}
local n = 1
for j =1,4 do
for i=1,13 do
local CN = table.concat(C,"",i,i)
local CS = table.concat(S,"",j,j)
table.insert(deck, n, CN … “-” … CS … “.png”)
n = n + 1
end
end
return true
end
Would it be better for my app if I use the display.group to populate the deck instead of the above code? Keep in mind that the cards will be animated on the screen too. [import]uid: 11809 topic_id: 5516 reply_id: 305516[/import]