The simple answer is it would be trivial to have ants have unique names use
ant id.

THe simples i can see is to use player.ant.count (select + update )

do a count of ants for player before each batch creation

I thought of 4 other ways but this is the simplest.
 On Sep 22, 2011 2:43 PM, "Romain &apos;Maz&apos; BILLOIR" <
[email protected]> wrote:
> (Frenchy, sorry =))
>
> Hi everyone, i'm working on a web browser based game:
> every player have got some ants and i want every ants of each player
> to have a unique name:
>
> Player 1:
> ant 1
> ant 2
> ant 3
> Player 2:
> ant 1
> ant 2
> ant 3
> ant 4
> ...
>
> To do that i need to create player1_seq and player2_seq and increment
> the player sequence whenever the player create an ant so i need to
> create sequence whenever a player subscribe.
>
> How to do that?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
[email protected].
> For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to