Results 1 to 2 of 2

Thread: random pictures...

  1. #1

    Thread Starter
    Member ariel_au's Avatar
    Join Date
    Mar 2001
    Posts
    48
    well, how do i generate the same random picture twice?
    i.e; i am currently working on a 'memory game'.

    i stored my pics in a folder and each pics are named in numerics. e.g pic1, pic2, pic3, pic4.

    and i wanted to generate 2 pics of the same e.g pic1 & pic1, pic5 & pic5.
    Last edited by ariel_au; Apr 7th, 2001 at 02:53 AM.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    maybe you mean something like this:
    Code:
    set picture1.picture = Loadpicture (folder & "\pic" & Int(1+rnd*4)) & ".bmp")
    set picture2.picture = picture1.picture
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width