Support for arrays?

JackieMacJackieMac Member Posts: 14
edited November -1 in Working with GS (Mac)
Hello,

Is there support for arrays? Or, some other way of storing and accessing a predefined list of things?

For example, how would I represent a shuffled deck of cards programatically? And then access them one at a time, to deal them?

Thanks.

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    That is actually a very interesting question, one I'd like to hear an answer to too :)

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Not currently support in an easy way. But with a lot of attributes, you can.
  • JackieMacJackieMac Member Posts: 14
    Hmm, can you give me a little bit of an example? I'm not sure how I'd populate and access the attributes effectively/efficiently.

    Thanks.
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    There's not really an efficient way for it. and it will probably be rule heavy.

    And it probably wouldn't be worthwhile to mention it because it would get slower and slower since you would need to run the random number generator over and over until you found a card you haven't chosen.
  • JackieMacJackieMac Member Posts: 14
    Okay. Well, I'll give it a go and post what I come up with. (assuming it works well enough) :-)
  • lukecalukeca Member Posts: 1
    I'm pretty interested in this too... Please let us know if you figure anything out, thanks!
Sign In or Register to comment.