I’m just wondering is there a really really really easy way of generating a normal set of cards in Codea?
Meaning picking randomly from the 52 and never picking the same card twice and checking for winning combinations?
is there a very very simple way of doing this that a complete brain dead failure like me can actually grasp and understand? (Without using 2 billion “if” statements to check all possibilities)
Note: I’m not begging for you guys to write the code, I’m just wondering if there is a simple understandable solution so all I really need is a yes or no.
Thanks, I had a read at that and oh my word it’s complex but it does answer my question. Can delete this thread now, thank you.
@mene but what do you want exactly? Just a random card list? or the list PLUS the graphics to draw cards on the display?
@Mene Here’s a simple example I had.
background(31, 98, 114, 255)
if getCard then
if s<3 then
if t.state==BEGAN then
str="Tap screen for next card"
for z=1,52 do
if #deck>0 then
str="End of deck\
press program restart"
@Mene Here’s a link to another card example. One of my versions there determines a best hand of 5 cards.