Trunk proto is done might have to change param because its an inefficient cord

This commit is contained in:
2024-10-25 08:10:42 -04:00
parent 0e0121c3c4
commit 0eb09a8a1b
2 changed files with 22 additions and 8 deletions

View File

@@ -61,7 +61,7 @@ var CircleInts = 0
var LogDumpOrdered = [] var LogDumpOrdered = []
var Order = [] var Order = []
var Intersections_from_root = [] var Intersections_from_root = []
var TargetCord = [[0,-11], [13,-13], [1,-20]] # HAD TO CHANGE TARGET CORD, IT WAS PREVIOUSLY [2,-10] var TargetCord = [[0,-11], [13,-13], [15,-19]] # HAD TO CHANGE TARGET CORD, IT WAS PREVIOUSLY [2,-10]
var CircleCompleted = null var CircleCompleted = null
var AutoBacktrack = false var AutoBacktrack = false
var IntersectionDict = {"Cord": [], "Data": [] } var IntersectionDict = {"Cord": [], "Data": [] }
@@ -80,6 +80,7 @@ var AllSetsToGoal = []
var TargetsArray = [] var TargetsArray = []
var Goal = false var Goal = false
var Trunk = [] var Trunk = []
var PreTrunk = []
func _input(event): func _input(event):
#if Current_Position != TargetCord: #if Current_Position != TargetCord:
@@ -102,7 +103,7 @@ func _input(event):
elif event.is_action_pressed("ui_accept"): elif event.is_action_pressed("ui_accept"):
AutoSolve() AutoSolve()
#print(Tree_Array) #print(Tree_Array)
# print(Current_Position)
func _process(delta): func _process(delta):
FoundGoal() FoundGoal()
AllObjectsFound() AllObjectsFound()
@@ -191,13 +192,26 @@ func AllObjectsFound():
CurrentInstructionSet.push_back(AllSetsToGoal[n].size()) CurrentInstructionSet.push_back(AllSetsToGoal[n].size())
print("The max is: ", (CurrentInstructionSet).max()) print("The max is: ", (CurrentInstructionSet).max())
var key = CurrentInstructionSet.find(CurrentInstructionSet.max()) var key = CurrentInstructionSet.find(CurrentInstructionSet.max())
print("THIS IS THE KEY: ")
print(AllSetsToGoal[key])
print()
print("***********************************")
for i in AllSetsToGoal.size(): for i in AllSetsToGoal.size():
if i != key: if i != key:
print(i) print("The I value is: ", i)
for x in AllSetsToGoal[key]: for x in AllSetsToGoal[key]:
print(x) if AllSetsToGoal[i].find(x) != -1:
var test = []
test.push_back(AllSetsToGoal[i].find(x))
PreTrunk.push_back(test)
print(AllSetsToGoal[i])
PreTrunk.erase(PreTrunk.min())
PreTrunk = PreTrunk.min()
#print(PreTrunk[0])
Trunk = AllSetsToGoal[key].slice(PreTrunk[0]+1)
print("This is the trunk: ")
print(Trunk)
print("Test Print ^^^")
Move_Check1 = move Move_Check1 = move

File diff suppressed because one or more lines are too long