Sounds like little more than a couple simple queries (CFQUERY) and some basic arithmetic. You'll need the rand() function for the randomization, or perhaps randRange() which will return an integer between two specified endpoints. Definitely doable with CF, for any kind of interactive game like this, the most troubling part is usually the UI, not the actual processing logic, and that's pretty much language-neutral.
cheers, barneyb On Sat, 15 Jan 2005 19:41:16 +0000, Chris Kavanagh <[EMAIL PROTECTED]> wrote: > Dear list, > > I've been asked to help make a web wargame! I was wondering if > ColdFusion is a capable tool. > > I'm basically envisaging a database that contains details of each > side's forces. Each turn, the players send commands via a web page. > Ideally CF then calculates the results of said commands and makes > alterations to the data accordingly. > > So, at its simplest: player one decides to attack player two. CF > compares the two forces then adds a random value to each. The force > with the highest result wins. CF determines how much damage has been > done to the winner and loser - based on the difference between the two > results - then changes the database accordingly. > > Is that doable? What CF commands should I be investigating for this > kind of calculation? > > Thanks! > CK. > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 8 invites. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190591 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

