Skip to main content
Participant
December 13, 2006
Question

Display External Images

  • December 13, 2006
  • 1 reply
  • 122 views
Hey guys, im trying to create a Blackjack game in my Adv. Higher computing class and i am having lots of trouble getting the card images (image/<cardname>.jpg) onto the screen, i found a way to do it with:

randomnumber = random.math()*52

if (randomnumber >= 1) then:
<load imagee>

but with the if statement im gonna have to do 1040 different if statements, can anyone give me a better way to do it (with code *beg*)

i would be really grateful

~Clone
This topic has been closed for replies.

1 reply

Inspiring
December 13, 2006
why dont you just put it into a loop?

for (var i=1; i<=52; i==) {
if (randomnumber >=i) {
<load imagee>
}
}