^^ well sort of
this is still pertaining to cube solver i have running around in the back of my mind, and kinda need some thought on a small search algorithom i am working on.
the idea is to search for values that match what is needed, this i fairly easy if you have deadicated routine for each search
here is the bare bone for searching 4 eadge pieces
in know there are no labels etc, how ever i cant help but this is a little bulky (and still mssing bit).
would something like this do the same as the nested if?
i am open to other ideas if you have any.
this is still pertaining to cube solver i have running around in the back of my mind, and kinda need some thought on a small search algorithom i am working on.
the idea is to search for values that match what is needed, this i fairly easy if you have deadicated routine for each search
here is the bare bone for searching 4 eadge pieces
Code:
main:
gosub search
search:
if b1 = search1 then
if b16 = search2 then
;dostuf
return
end if
end if
if b3 = search1 then
if b19 = search2 then
;dostuf
return
end if
end if
if b5 = search1 then
if b13 = search2 then
;dostuf
return
end if
end if
if b7 = search1 then
if b10 = search2 then
;dostuf
return
end if
end if
if b16 = search1 then
if b1 = search2 then
;dostuf
return
endif
end if
if b19 = search1 then
if b3 = search2 then
;dostuf
return
end if
end if
if b13 = search1 then
if b5 = search2 then
;dostuf
return
end if
end if
if b10 = search1 then
if b7 = search2 then
;dostuf
return
end if
end if
;if item not found, run error routine
would something like this do the same as the nested if?
Code:
if b1 = search1 and b16 = search2 then
;do stuff here
;return to main program - this is sub-procedure
endif
...