From: Justin R. <jus...@gm...> - 2011-03-24 15:59:00
|
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. > |