Results 1 to 12 of 12
  1. #1
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Negotiate A Range (2002)

    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
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Negotiate A Range (2002)

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

    Steve

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Negotiate A Range (2002)

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

    Steve

  4. #4
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Negotiate A Range (2002)

    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.
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  5. #5
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Negotiate A Range (2002)

    Thanks Steve. I'll take a look.
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Negotiate A Range (2002)

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

  7. #7
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Negotiate A Range (2002)

    Excellent! Thanks Hans. It's perfectly comprehensible. I'm still trying to figure out the code provided by Steve's link.
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  8. #8
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Negotiate A Range (2002)

    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 <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Jerry

  9. #9
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Negotiate A Range (2002)

    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
    [MS MVP - Word]

  10. #10
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Negotiate A Range (2002)

    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.
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  11. #11
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Negotiate A Range (2002)

    Very quick thoughts.
    Macropod is correct, of course. Also, the counter must not be moved unless its a valid move. Here's my suggestion:
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  12. #12
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Negotiate A Range (2002)

    Yep, that makes sense, it was late when I had the inspiration but that makes perfect sense......now off to write the pseudo-code <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Jerry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •