Jump to content
IAMK

How to flag this point?

Recommended Posts

IAMK
Posted (edited)

I have been twirling my fork around for a few hours and have finally reached a fairly solid point in my script. One thing which is not coming to me though, is ideas on how to flag a specific point. I have attempted doing it a few ways with no avail.

I won't be posting my code unless it's REALLY required (It will be extremely difficult to understand + it's for work). I think the following will be able to get the idea across easily.

What my code does:
- Go as deep as you can ($depth ;Goes from 1 -> 5).
- Increase the value of $X[$depth] as much as you can ($X[$depth] ;Can be a number 0 -> 5).
- When the value of $X[$depth] = 5, decrease the depth by 1.
- When the sum of all $X[$depth] elements = 10, shuffle 1 to the highest point (left-most numbers = depths):
Picture1.png.de90c5619cc1bafaf56fb20d43b08bf2.png
- When $depth = 1, decrement $X[$depth] and jump back up to the first non-0 AND do not increment it, causing it to do:
Picture2.png.b63e4498103b72f0d729bf95a623e3c7.png

^ Is what I don't have working. I currently go back to depth 5, see a 5, jump out to depth 4, see a 4, then increment it to 5 (don't want this to happen) before decrementing it by 1. I want to go back to depth 4 and decrement it, then do the +1/-1 shuffle while jumping out to higher depths.

 

Thank you in advance.

Edited by IAMK

Share this post


Link to post
Share on other sites
FrancescoDiMuro

Posting some code? :)

Best Regards.


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
JLogan3o13
5 minutes ago, FrancescoDiMuro said:

Posting some code? :)

Best Regards.

Unable to read the OP? :)

@IAMK to give people a better understanding, you might try writing the function in pseudo-code if you don't have that piece coded entirely:

for $depth = 1 To -5
    ;do this
    ;then this
next

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
FrancescoDiMuro
2 minutes ago, JLogan3o13 said:

@IAMK to give people a better understanding, you might try writing the function in pseudo-code if you don't have that piece coded entirely:

That is what I was asking :)


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
Pured
Posted (edited)

@JLogan3o13@FrancescoDiMuro

I don't know what's wrong, but I can't type anything in the previous post, sorry.

Edited by Pured
Posts merged

Share this post


Link to post
Share on other sites
IAMK

FYI: I have scrapped this extremely complex method and started from scratch with a much simpler design (one anyone can read and understand - New thread).

I'm closing this thread.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×