Core RTS: Path finding seems to work!

This commit is contained in:
Krzosa Karol
2023-04-18 17:26:08 +02:00
parent bea10a621e
commit 56eb7e6de2
4 changed files with 89 additions and 13 deletions

View File

@@ -88,9 +88,10 @@ InsertSortedDecreasing :: (a: *Array($T), item: T)
for i := 0, i < a.len, i += 1
it := a.data + i
if it.value_to_sort_by <= item.value_to_sort_by
insert_index = i
Insert(a, item, i)
break
if insert_index == -1
Add(a, item)