• Negotiate A Range (2002)

    Author
    Topic
    #433244

    I am trying to simulate a Snakes and Ladders game but I am having difficulty working out how to select the appropriate cell in a range having thrown a given number. So, in the image below, it amounts to travelling between cells which contain numbers – say, from 12 to 20. I hope that makes sense.
    TIA

    Viewing 2 reply threads
    Author
    Replies
    • #1018595

      I am a little confused by what you want. Could you elaborate?

      Steve

      • #1018598

        I’ll try, Steve. The image shows a range of cells on a workshheet. If I throw a six, for example, I would want, in turn, cells numbered 1 to 6 to be selected. If I then throw an eleven, then cells numbered 7 to 17 to be selected in turn. Does that help?
        TIA.

    • #1018597

      You may want to take a look at http://www.mrexcel.com/chal/snakes.zip%5B/url%5D. It is a snakes and ladders game already in excel. The code is unprotected so it could give you some ideas…

      Steve

    • #1018601

      Here is an example (with only one die). It’s just meant as a starting point.

      • #1018605

        Excellent! Thanks Hans. It’s perfectly comprehensible. I’m still trying to figure out the code provided by Steve’s link.

        • #1018679

          Rob

          Your little idea has been an inspiration to me as I have to run a workshop in October on the Logic of programming and i have been asked to explain various concepts of loop and variable and this really hits the spot. Tonight I was working on the rules of the game of Snakes and Ladders. As it is quite close to your heart at the moment, can you have a look at this process map and see if you agree or disagree with the workflow of a S and L counter…cheers

          Of course if Rob is busy building can anyone else help grin

          • #1018712

            Hi Jerry,

            I think you need a ‘wait your turn’ procedure!! As it is, once someone starts, they keep going until arriving at the end or throwing a number > moves remaining.

            Cheers,
            Paul Edstein
            [Fmr MS MVP - Word]

          • #1018724

            Sorry for the delay in responding, Jerry. I’m a bit busy at the moment but I’ll throw in my tuppennyworth as soon as I can.
            Ciao.

          • #1018728

            Very quick thoughts.
            Macropod is correct, of course. Also, the counter must not be moved unless its a valid move. Here’s my suggestion:

            • #1018736

              Yep, that makes sense, it was late when I had the inspiration but that makes perfect sense……now off to write the pseudo-code cheers

    Viewing 2 reply threads
    Reply To: Negotiate A Range (2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: