Fixing circle bug with extra dead end data

This commit is contained in:
2024-10-11 08:11:11 -04:00
parent 1722272b79
commit 76cddca5a5

View File

@@ -118,6 +118,13 @@ func _process(delta):
#print(Ordered_Commands_Backward) #print(Ordered_Commands_Backward)
#print(InverNext) #print(InverNext)
#print(CordsDump) #print(CordsDump)
#if Individual_Steps.size() > 7:
# print("*****************************")
# print()
# print(Individual_Steps)
# print(Tree_Array)
# print()
# print("*****************************")
else: else:
if Done != 1: if Done != 1:
print("******************************") print("******************************")
@@ -181,6 +188,7 @@ func BackTracking():
print("To get to the last intersection follow these steps : ", TrackBack) print("To get to the last intersection follow these steps : ", TrackBack)
if Detail_Dict.Type == "Dead End" and Current_Position != [0,0]: if Detail_Dict.Type == "Dead End" and Current_Position != [0,0]:
GoBack(TrackBack) GoBack(TrackBack)
print(TrackBack)
func Circling(): func Circling():
@@ -249,13 +257,13 @@ func Skip():
if CircleInts + 1 == CircleIntsMax: if CircleInts + 1 == CircleIntsMax:
FirstIntChange() FirstIntChange()
GoBack(Individual_Steps[0]) GoBack(Individual_Steps[0])
Individual_Steps.pop_front() #Individual_Steps.pop_front()
print("First Go To is : ",FirstGoTo) print("First Go To is : ",FirstGoTo)
else: else:
for n in 2: for n in 2:
print("N is equal to: ",n) print("N is equal to: ",n)
GoBack(Individual_Steps[0]) GoBack(Individual_Steps[0])
Individual_Steps.pop_front() #Individual_Steps.pop_front()
print("Needs More WORK!!!!!!!") print("Needs More WORK!!!!!!!")
print("First Go To is : ",FirstGoTo) print("First Go To is : ",FirstGoTo)
@@ -381,19 +389,22 @@ func Intersection_Tree():
func CheckForTreeDeadEnds(): func CheckForTreeDeadEnds():
if Tree_Array.size() > 0: if Tree_Array.size() > 0:
if Tree_Array[-1] <= 0: if Tree_Array[-1] <= 0:
Tree_Array.pop_back()
Tree_Array[-1] -= 1
print(Tree_Array) print(Tree_Array)
print(Individual_Steps[0])
GoBack(Individual_Steps[0]) GoBack(Individual_Steps[0])
Individual_Steps.pop_front() Individual_Steps.pop_front()
Tree_Array.pop_back()
Tree_Array[-1] -= 1
else: else:
pass pass
func GiveOrder(): func GiveOrder():
if Cicling == false:
Ordered_Commands_Backward.erase("") Ordered_Commands_Backward.erase("")
Ordered_Commands_Forward.erase("") Ordered_Commands_Forward.erase("")
#Ordered_Commands_Backward.clear()
if move_check != move: if move_check != move:
TrackIntersections() TrackIntersections()
if Detail_Dict.Been_There == false: if Detail_Dict.Been_There == false:
@@ -558,10 +569,10 @@ func AutoSolve():
DirectionStrengths[n] -= 1000 DirectionStrengths[n] -= 1000
for i in OptionArrays: for i in OptionArrays:
if Intersections.find(i) != -1: if Intersections.find(i) != -1:
DirectionStrengths[n] -= 100 DirectionStrengths[n] -= 500
if Cicling == true: #if Cicling == true:
print("ITS CIRCLING DO SOME MODS") # print("ITS CIRCLING DO SOME MODS")
print(IntOptions ) # print(IntOptions )
AutoBacktrack = false AutoBacktrack = false
var HighestPoints = DirectionStrengths.find(max(DirectionStrengths[0],DirectionStrengths[1],DirectionStrengths[2],DirectionStrengths[3])) var HighestPoints = DirectionStrengths.find(max(DirectionStrengths[0],DirectionStrengths[1],DirectionStrengths[2],DirectionStrengths[3]))
print(DirectionStrengths) print(DirectionStrengths)