IAMK Posted May 23, 2018 Share Posted May 23, 2018 (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): - When $depth = 1, decrement $X[$depth] and jump back up to the first non-0 AND do not increment it, causing it to do: ^ 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 May 23, 2018 by IAMK Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted May 23, 2018 Share Posted May 23, 2018 Posting some code? Best Regards. Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 23, 2018 Moderators Share Posted May 23, 2018 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 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted May 23, 2018 Share Posted May 23, 2018 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 ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Pured Posted May 23, 2018 Share Posted May 23, 2018 (edited) @JLogan3o13@FrancescoDiMuro I don't know what's wrong, but I can't type anything in the previous post, sorry. Edited May 24, 2018 by Pured Posts merged Link to comment Share on other sites More sharing options...
IAMK Posted May 24, 2018 Author Share Posted May 24, 2018 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now