1. 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

2. Re: Negotiate A Range (2002)

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

Steve

3. 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. 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.

5. Re: Negotiate A Range (2002)

Thanks Steve. I'll take a look.

6. Re: Negotiate A Range (2002)

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

7. 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.

8. 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>

9. 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.

10. 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.

11. 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:

12. 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>

Posting Permissions

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