IAMK Posted May 23, 2018 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
FrancescoDiMuro Posted May 23, 2018 Posted May 23, 2018 Posting some code? Best Regards. Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Moderators JLogan3o13 Posted May 23, 2018 Moderators 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!
FrancescoDiMuro Posted May 23, 2018 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
Pured Posted May 23, 2018 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
IAMK Posted May 24, 2018 Author 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.
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