Jan E. wrote in post #1068114:
> Sebastjan H. wrote in post #1068110:
>> I would have the game generate a defined number of beasts and spells.
>> The player would then simply choose the ones for battle each turn. The
>> player would not generate the beasts nor spells. They would only use
>> them. This is the idea for now. I may change or expand later.
>
> The player doesn't generate anything, it's all done by the program.
>
> My suggestion has nothing to do with the game logic, it's only a
> technical matter: Rather than actually creating all possible beasts
> (which will lead to unnecessary objects), I'd only generate the *names*
> and later create the object for the chosen name.
>
> Let's say the player has to choose one beast from 1000 possible beasts.
> Why would you want to create all 1000 possible beast objects and then
> throw away the 999 which the player didn't select? Wouldn't it make more
> sense to only have 1000 strings for the names and wait with the object
> creation until the player has actually chosen one name?
>
> Maybe you're thinking too much in terms of physical objects. In order to
> "generate a beast", you don't actually have to create a beast object.
> It's enough to have the information which identifies this beast (in this
> case the name).

You're right, of course:) I misunderstood you earlier.
I still need to adapt the thinking process a bit and this kind of 
knowledge helps a lot.

On the other hand, I am still considering this to be a small scale game 
with predefined let's say only 15 to 20 cards. However, If I were to 
expand it I need this adaptation.

thx again.
regards,
seba

-- 
Posted via http://www.ruby-forum.com/.