From: Erik V. <eri...@xs...> - 2011-03-24 16:48:52
|
I think the way to do it would be to define the company name as a game option. You could throw dice and enter the company name as the option value, or perhaps build in a random generator that select the option value. In any case, it must be settled before the game starts. Erik. Van: Steve Undy [mailto:ste...@gm...] Verzonden: donderdag 24 maart 2011 17:01 Aan: Development list for Rails: an 18xx game Onderwerp: Re: [Rails-devel] Random Element Or possibly just write the random generator seed value to the save file. Steve Undy st...@ro... On Thu, Mar 24, 2011 at 9:58 AM, Justin Rebelo <jus...@gm...> wrote: Rails randomizes seating order and then creates the game with the specified order. I would think it could similarly randomly determine any sort of value (such as which company was selected) and then write only the result of that to the game log. So when played back it would just be (in human terms) "Company X was chosen for Private #5. Player 3 takes Private #5 and 20% of Company X", for instance. On 3/24/11, Scott Petersen <sc...@re...> wrote: > Would there be any way for me to implement a random element into a game > supported by Rails? I'm thinking I would like to have the last Private > Company be a randomly selected 20% share. Could Rails have a function that > first determines whether this company has been determined and if not, select > one at random? > > I know Rails plays out the game each time a save is loaded, so perhaps it > would not be able to deal with this. One of my main design goals for my > prototype is to implement it in Rails, so I don't want to introduce > something that is impossible to implement given the Rails architecture. I > will manually select this for playtesting via the XML files. > ---------------------------------------------------------------------------- -- Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel |