Generic functions?

Hi all,

I’m new to Xojo and am learning it by creating a card game. Where do I put general functions that I want to be available everywhere in the entire application such as shuffledeck(), drawcard() etc?

I want the scope of these functions to be global.

Thanks

In a module.

But rethink your design. The functions you mentioned seem more appropriate to a Deck class.

Thanks. Yes, a “Deck” class built on a “Card” class is for sure the way to go, just wasn’t sure where to even define the class.

right at the root level
New Class - rename it Card
New Class - rename it Deck
Then add a property Cards() as Card to the Deck class