Wrox Programmer Forums
|
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 24th, 2007, 10:52 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default SNAKE AND LADDER GAME

Hello everybody,
     I'm developing a game of "snake & ladder". Where i'm generating a random no.between 1&6(dice) and adding all the numbers by hitting command button. Howcan I do this? Thanks in advance.
                                            -Saptarshi


 
Old January 24th, 2007, 11:31 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there...

and you are using what version of VB???

the question is about generating a random number or how to get that random number between 1 and 6???

anyway take a look at randomize, random and to get a number between 1 and 6 just use:

INT(6 * RANDOM()) + 1

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
how create game snake? mamandis Beginning VB 6 13 January 4th, 2008 10:47 AM
Pong Game Help -XM- BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 4 June 20th, 2007 02:23 PM
SNAKE AND LADDER GAME saptarshi Beginning VB 6 0 January 24th, 2007 10:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.